Matlab - Processamento de Imagem
Matlab - Processamento de Imagem
Image Processing
Tensor Transform and Discrete
Tomography with MATLAB®
Image
Focusing on mathematical methods in computer tomography, Image
Processing: Tensor Transform and Discrete Tomography with
MATLAB® introduces novel approaches to help in solving the problem
of image reconstruction on the Cartesian lattice. Specifically, it
Processing
discusses methods of image processing along parallel rays to more Tensor Transform and Discrete
quickly and accurately reconstruct images from a finite number of
projections, thereby avoiding overradiation of the body during a
computed tomography (CT) scan. Tomography with MATLAB®
The book presents several new ideas, concepts, and methods, many
of which have not been published elsewhere. New concepts include
methods of transferring the geometry of rays from the plane to the
Cartesian lattice, the point map of projections, the particle and its X-ray set
field function, and the statistical model of averaging. The authors
supply numerous examples, MATLAB®-based programs, end-of-chapter
problems, and experimental results of implementation.
image f(n,m)
The main approach for image reconstruction proposed by the authors
differs from existing methods of back-projection, iterative reconstruction,
and Fourier and Radon filtering. In this book, the authors explain how
to process each projection by a system of linear equations, or linear
convolutions, to calculate the corresponding part of the 2-D tensor
or paired transform of the discrete image. They then describe how projection
to calculate the inverse transform to obtain the reconstruction. The ø=26.565º
proposed models for image reconstruction from projections are simple
and result in more accurate reconstructions.
K14749
ISBN: 978-1-4665-0994-8
90000
9 781466 509948
Artyom M. Grigoryan n Merughan M. Grigoryan
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
♣
This page intentionally left blank
Contents
Author Bios xi
Preface xiii
2 Direction Images 41
vii
viii IMAGE PROCESSING
Bibliography 423
Appendix A 427
Appendix B 433
Index 441
Author Bios
xi
This page intentionally left blank
Preface
xiii
xiv IMAGE PROCESSING
Symbol Description
1
2 CHAPTER 1: 2-D DFT
FIGURE 1.1
Block-diagram of calculation of the 2-D discrete transform (DT) (separable).
where t denotes the matrix operation of transposition, and square brackets [·]
are used to denote the matrices of the transformations T and image f.
As an example, we consider the 2-D DFT of the image fn,m , which is
defined by
X N−1
N−1 X
Fp,s = (FN,N ◦ f)p,s = fn,m W np+ms , p, s = 0 : (N − 1), (1.1)
n=0 m=0
Image Processing 3
where Fn (s) is the value of the 1-D DFT of row number n at point s. To
calculate the 2-D DFT, 2N 1-D DFTs are used in the row-column algorithm.
This algorithm is simple, but requires many operations of multiplication and
addition. All twiddle coefficients, W t , t = 0 : (N − 1), lie on N equidistant
points of the unit circle, and many of them are irrational numbers.
We now consider the transformation whose kernel lies only on two points
±1 on the unit circle. The 2-D separable discrete Hadamard transform of order
N × N, where N = 2r , r > 1, is defined as
X N−1
N−1 X
Ap,s = (AN,N ◦ f)p,s = fn,m a(p; n)a(s; m)
n=0 m=0
N−1
" # (1.3)
X N−1 X
= fn,m a(s; m) a(p; n).
n=0 m=0
where (n0 , n1 , ..., nr) and (p0 , p1 , ..., pr) are the binary representation of num-
bers n and p, respectively.
As an example, Figure 1.2 shows an image (2048 × 2048) in part a, along
with the 2-D discrete Fourier and Hadamard transforms of the image in b and
c, respectively. The realization of the Hadamard transformation requires only
operations of addition (and subtraction). From the computational point of
view, the 1-D Hadamard transform is faster than the complex Fourier trans-
form. These two different transforms can share the same fast algorithm. For
instance, the fast Fourier transform by the paired transforms can also be used
for the fast Hadamard transform, when considering all twiddle coefficients W t
equal 1 [45].
We now present the tensor approach and its improvement, for dividing
the calculation of the 2-D DFT into the minimal number of short 1-D trans-
forms. The approach is universal because it can be implemented to calculate
other discrete unitary transforms, such as the Hadamard, cosine, and Hartley
transforms [39, 45, 48], and transforms of high dimensions.
4 CHAPTER 1: 2-D DFT
FIGURE 1.2
(a) Original image of size 2048 × 2048, (b) 2-D DFT (in absolute mode and
shifted to the center), and (c) 2-D DHdT of the image.
FIGURE 1.3
Block diagram of image processing by 1-D signals. (DSP = digital signal
processing)
176 200
174 160
140
173
120
172
100
171
80
170
60
169 40
168 20
167 0
0 50 100 150 200 250 0 50 100 150 200 250
1 176
original signal
175
0.95
174
0.9
173
0.85 172
0.8 171
new signal
170
0.75
169
0.7
168
0.65 167
0 50 100 150 200 250 0 50 100 150 200 250
250
200
150
100
50
0
0 50 100 150 200 250
where ap1 ,p2 ,n1 ,n2 = ϕp1 ,p2 (n1 , n2 ) are coefficients of the matrix of the trans-
formation A. Elements (p1 , p2 ) ∈ X are referred to as frequency-points. We
assume that the image f and the transform A ◦ f are defined on the same
two-dimensional rectangular integer lattice of size N1 × N2 ,
and the transformation is unitary. The matrices of the transformation and its
conjugate are symmetric,
1 j2π 1 j2π
FN = √ || e− N np ||n,p=0:(N−1), ∗
[FN ] = √ || e N np ||n,p=0:(N−1),
N N
∗
and [FN ][FN ] = I. The conjugate matrix is thus the matrix of the inverse 1-D
DFT.
The orthogonality of the basis functions of the 2-D DFT follows directly
from the orthogonality of the basis functions of the 1-D DFT, because of
separability ϕp,s (n, m) = ϕp (n)ϕs (m). Indeed, the following calculations hold:
X N−1
N−1 X X N−1
N−1 X
ϕp1 ,s1 (n, m)ϕ̄p2 ,s2 (n, m) = ϕp1 (n)ϕs1 (m)ϕ̄p2 (n)ϕ̄s2 (m)
n=0 m=0 n=0 m=0
N−1
X N−1
X
= ϕp1 (n)ϕ̄p2 (n) ϕs1 (m)ϕ̄s2 (m) = δ(p1 , p2 )δ(s1 , s2 ).
n=0 m=0
with generators (p1 , p2 ) from a certain subset J ⊂ X = XN1 ,N2 . The cyclic
group T with a generator (p1 , p2) is defined as a set of frequency-points which
are integer multiples to the generator,
T = Tp1 ,p2 = {(kp1 , kp2 ); k = 0 : (card T − 1)} (1.14)
We use the short notation kpi = (kpi ) mod Ni for i = 1 : 2.
Example 1.2 ((Lattice 3 × 3)) The covering of the lattice 3 × 3 can be de-
fined by σ = (T1,0 , T1,1 , T1,2 , T0,1) as shown
• • • • ◦ ◦ • ◦ ◦ • ◦ ◦ • • •
• • • = • ◦ ◦ , ◦ • ◦ , ◦ ◦ • , ◦ ◦ ◦ .
• • • • ◦ ◦ ◦ ◦ • ◦ • ◦ ◦ ◦ ◦
X3,3 T1,0 T1,1 T1,2 T0,1
10 CHAPTER 1: 2-D DFT
When the generator is (1, 1), all elements of the group T1,1 are located along
the diagonal of the lattice. All elements of the group T1,0 are located on the
first row of the lattice, and the elements of group T0,1 are located on the first
column of the lattice.
All other groups Tp,s coincide with the groups of the covering σ. For in-
stance, T0,2 = T0,3 = T0,1 , T2,2 = T3,3 = T1,1 , and T2,1 = T1,2 .
J = J5,5 = {(0, 1), (1, 1), (2, 1), (3, 1), (4, 1), (1, 0)}. (1.16)
Figure 1.5 shows the location of all frequency-points of these six groups. These
groups intersect only at point (0, 0). If the covering composed of these groups
reveals the 5 × 5-point 2-D transformation, then this transformation can be
split by six five-point 1-D transformations. This transformation is the Fourier
transformation. To calculate, for instance, the 5 × 5-point 2-D DFT, only
six 1-D five-point transforms are required, instead of ten transforms in the
“row-column” method.
In the general N × N case, the elements of the group Tp1 ,p2 lie on parallel
lines at angle θ = tan−1 (p2 /p1 ) to the horizontal axis. The number l of such
lines is determined as follows. If p1 = 0 or p2 = 0, then l = 1. For other
cases, let k1 and k2 be the smallest integers satisfying the relations k1 p1 =
k2 p2 = N − 1. Then, l = k1 /k2 with k1 ≥ k2 , and l = k2 /k1 with k1 < k2 .
Image Processing 11
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
4 4 4
3 3 3
2 2 2
1 1 1
0 0 0
0 1 2 3 4 0 1 2 3 4 0 1 2 3 4
FIGURE 1.5
Arrangement of frequency-points of groups Tp1 ,p2 covering the lattice 5 × 5.
For instance, when N = 5 and (p1 , p2 ) = (2, 1), we obtain 2p1 = 4p2 = 4 and
l = 4/2 = 2. The frequency-points of the group T2,1 lie on two parallel lines at
angle θ = tan−1 (1/2) = 26.5651◦ to the horizontal axis (see Figure 1.5). The
points of this group can also be considered as lying on three parallel lines at
angle θ1 = θ − 90◦ = −63.4349◦ to the horizontal axis.
It is important to note, that if we splice the opposite sides of the lattice
bounds, then the lattice will be represented as a net traced on the surface
of a three-dimensional torus and the mentioned l lines will compose a closed
spiral on the torus, which will pass through those points on the net, which
correspond to the points (0, 0) and (p1 , p2 ). All elements of the cyclic group
will be the points of intersection of the spiral with the net. As an example,
(0,0)
T1,2
T1,1
Figure 1.6 shows the points of the lattice X20,20 on the torus and two spirals
with frequency-points of the groups T1,1 and T1,2 which intersect at the knot
(0, 0).
The irreducible covering σ of the domain X composed from groups (1.14)
is unique. To illustrate this property, we consider the square lattice X5,5 . The
irreducible covering σ of X5,5 is the family of six groups given in (1.15),
σ = (T0,1 , T1,1 , T2,1 , T3,1, T4,1 , T1,0 ).
The cyclic group Tp1 ,p2 with any other generatrix (p1 , p2 ) 6= (0, 0), different
from generators (0, 1), (1, 1), (2, 1), (3, 1), (4, 1) and (1, 0), coincides with one
of the groups of the covering σ. For instance,
T1,2 = {(0, 0), (1, 2), (2, 4), (3, 1), (4, 3)} = T3,1 ,
T3,2 = {(0, 0), (3, 2), (1, 4), (4, 1), (2, 3)} = T4,1 ,
T2,2 = {(0, 0), (2, 2), (4, 4), (1, 1), (3, 3)} = T1,1 .
Fp1 ,p2 = (F ◦ f)p1 ,p2 = fn1 ,n2 WNn11p1 WNn22 p2 , (p1 , p2) ∈ X, (1.17)
n1 =0 n2 =0
In other words, N components Fkp1,kp2 of the 2-D DFT of the image f can
be represented by the 1-D sequence of length N,
fTp1 ,p2 = {fp1 ,p2 ,0 , fp1 ,p2 ,1 , . . . , fp1 ,p2 ,N−1 } . (1.22)
The sequence fTp1 ,p2 determines the spectral information of the image at
frequency-points of the set Tp1 ,p2 . Such a sequence is called the splitting-signal,
or the image-signal. The components of the splitting-signal are numbered by
the set of three, or triplets (p1 , p2 , t), where two components represent the
frequency (p1 , p2 ) and t is referred to as the time. Thus the splitting-signal
is the (2-D frequency)-(1-D time) representation of the 2-D image f, which
defines the full 2-D DFT of f at the frequency-points of the set Tp1 ,p2 .
The set of splitting-signals
We here separately consider the set of generators for the most interesting
cases, when N1 = N2 = N, and N is a general prime, the product of two
prime numbers, and then we describe the case when N is a power of prime.
1.4.2 N is prime
Let N > 1 be the prime. The irreducible covering σJ of the set XN,N has the
cardinality N + 1, i.e.,
card σJ = N + 1. (1.26)
Thus, the least number of cyclic groups Tp,s that together cover the period
X equals (N + 1). Indeed, the irreducible covering σJ is determined by the
following set of generators:
J = JN,N = {(0, 1), (1, 1), (2, 1), ..., (N − 1, 1), (1, 0)}. (1.27)
J = {(1, 0), (1, 1), (1, 2), ..., (1, N − 1), (0, 1)}.
5 5 5 5
0 0 0 0
0 1 2 0 1 2 0 1 2 0 1 2
20 20 20 20
15
|Ak| 15
|Bk| 15
|Ck| 15
|Dk|
10 10 10 10
5 5 5 5
0 0 0 0
0 1 2 0 1 2 0 1 2 0 1 2
2 2 2 2
1 1 1 1
0 0 0 0
−1 −1 −1 −1
−1 0 1 2 3 −1 0 1 2 3 −1 0 1 2 3 −1 0 1 2 3
FIGURE 1.7
Four splitting-signals (the first row), the 3-point DFTs (in absolute scale)
of the splitting-signals (the second rows), and the location of the frequency-
points of the cyclic groups T ∈ σ (the third row).
1 0 0 1 0 0 1 0 0
0 1 0 0 1 0 0 1 0
0 0 1 0 0 1 0 0 1
1 0 0 0 0 1 0 1 0
0 1 0 1 0 0 0 0 1
0 0 1 0 1 0 1 0 0
[χσ ] =
1
. (1.33)
0 0 0 1 0 0 0 1
0 1 0 0 0 1 1 0 0
0 0 1 1 0 0 0 1 0
1 1 1 0 0 0 0 0 0
0 0 0 1 1 1 0 0 0
0 0 0 0 0 0 1 1 1
In matrix form, the described tensor algorithm of the 3 × 3-point DFT can
be written as
F0,0 11 1
F0,1 1 W W 2
F0,2 1 W 2 W
2
F1,1 1W W
2
F2,2 = 1W W [χσ ]f .
2
F2,1 1W W
2
F1,2 1W W
2
F1,0 1W W
F2,0 1W 2 W
The tensor algorithm of the 3 × 3-point DFT uses the following number of
arithmetical operations: 4 real multiplications and 38 real additions, because
the sequence f is real. Indeed, since W 2 = −1 − W, we have the following:
x
F1 1 W W2 x + W y − (z + W z)
= y =
F2 1W 2 W x − (y + W y) + W z
z (1.34)
x − z + W (y − z)
= .
x − y − W (y − z)
In the general case, for a prime number N > 3, in the traditional row-column
algorithm, 2N one-dimensional N -point DFTs are used. Therefore, the tensor
algorithm decreases the number of multiplications by 2N/(N + 1) times, i.e.,
almost by 2 times, for large N. The tensor transform χσ requires N 3 − N
additions.
and fT2,1 = {9, 12, 7, 6, 8}. The sum of the this signal equals the sum of the
image f, i.e.,
4
X 4
X 4
X
f2,1,t = 9 + 12 + 7 + 6 + 8 = 42 = fn1 ,n2 .
t=0 n1 =0 n2=0
This transform coincides with the 2-D DFT of the image f at frequency-points
of the group
T2,1 = {(0, 0), (2, 1), (4, 2), (1, 3), (3, 4)},
as shown in the following table:
2 3
42 0 0 0 0
60
6 0 0 −3.1631 + 1.4001j 0 7
7
6 0 4.6631 − 4.3920j 0 0 0 7.
6 7
40 0 0 0 4.6631 + 4.3920j 5
0 0 −3.1631 − 1.4001j 0 0
We can fill the remaining values of the 2-D DFT, by calculating the 1-D
DFTs of other splitting-signals. For instance, for the signal corresponding to
the generator (p1 , p2 ) = (3, 1), we have the following table of time-points:
0 1 2 3 4
3 4 0 1 2
||t = (n1 · 3 + n1 · 1) mod 5||n2,n1 =0:4 = 1 2 3 4 0 .
4 0 1 2 3
2 3 4 0 1
and fT3,1 = {6, 5, 9, 14, 8}. The five-point DFT of this splitting-signal equals
This transform defines the 2-D DFT of the image at frequency-points of the
group T3,1 = {(0, 0), (3, 1), (1, 2), (4, 3), (2, 4)}. In this stage, the 2-D DFT is
filled as shown in the following table:
2 3
42 0 0 0 0
60
6 0 2.5902 − 2.9919j −3.1631 + 1.4001j 0 7
7
6 0 4.6631 − 4.3920j 0 0 −8.5902 − 5.7921j 7
6 7.
4 0 −8.5902 + 5.7921j 0 0 4.6631 + 4.3920j 5
0 0 −3.1631 − 1.4001j 2.5902 + 2.9919j 0
In a similar way, the 1-D DFTs of the splitting-signals fT0,1 , fT1,1 , fT4,1 ,
and fT1,0 fill the rest of the table of the 2-D DFT of the image f. The tensor
20 CHAPTER 1: 2-D DFT
% ===============================================================
% Call: TT2D_Nisprime.m / A.M. Grigoryan, 11/17/2001
% Demo code for calculating the NxN-point DFT by 2-D DTT.
% (N+1) N-point DFT are used, when N is a prime number.
% For each generator (p,s), two functions are called:
% ft_pst(image,p,s) - calculates the splitting-signal
% cyclic_group(p,s,N) - calculates the cyclic group T(p,s)
% The "tree" image can be taken from the library of
% The Signal and Image Processing Institute, University of
% Southern California, by address http://sipi.usc.edu/database/
fid=fopen(’tree.img’,’rb’);
f=fread(fid,[256,256]); fclose(fid); clear fid; f=f’;
% extend this image to the size 257x257 as
f(:,257)=f(:,256); f(257,:)=f(256,:);
% Set of generators J(257,257)
N=257; N1=N+1;
Jps=ones(2,N1); Jps(1,1:N)=0:N-1; Jps(1:2,N1)=[1,0];
% 2-D DFT by the tensor transform
FT=zeros(N);
for k=1:N1
s=Jps(1,k); p=Jps(2,k);
Image_signal=zeros(1,N); Image_signal=ft_pst(f,p,s);
TDFFT_signal=fft(Image_signal); T_ps=cyclic_group(p,s,N)+1;
for k=1:N
p1=T_ps(k,1); s1=T_ps(k,2); FT(s1,p1)=TDFFT_signal(k);
end
end
% Verify if the 2-D DFT has been calculated correctly
Inv_image=real(ifft2(FT));
Inv_image=Inv_image.*(Inv_image>=0); Inv_image=round(Inv_image);
% Display the original image and inverse 2-D DFT
figure; colormap(gray)
subplot(1,3,1); imagesc(f);
axis(’image’); axis(’off’); title(’Original image’);
Image Processing 21
subplot(1,3,2); image(abs(FT)/N);
axis(’image’); axis(’off’); title(’2-D DFT by TT’);
subplot(1,3,3); imagesc(Inv_image);
axis(’image’); axis(’off’); title(’Inverse 2-D DFT’);
% ============================================================
function T_ps=cyclic_group(p1,p2,N)
T_ps=zeros(N,2); p=0; s=0;
for k=1:N
if p>=N p=p-N; end
if s>=N s=s-N; end
T_ps(k,:)=[p,s]; p=p+p1; s=s+p2;
end
This program also prints the original image, the 2-D DFT and its inverse,
to verify the calculations.
All ones in the masks of the functions lie on parallel lines passing the knots
of the corresponding sets Vp,s,t .
Coefficients of this matrix show the points of sets V1,1,t , t = 0 : 3. The image-
signal fT1,1 is defined as
f1,1,0 = f0,0 + f3,1 + f2,2 + f1,3 = 1 + 2 + 2 + 1 = 6
f1,1,1 = f1,0 + f0,1 + f3,2 + f2,3 = 2 + 2 + 1 + 3 = 8
fT1,1 = (1.40)
f1,1,2 = f2,0 + f1,1 + f0,2 + f3,3 = 1 + 1 + 1 + 2 = 5
f1,1,3 = f3,0 + f2,1 + f1,2 + f0,3 = 1 + 3 + 1 + 3 = 8.
For the generator (p, s) = (1, 2), the corresponding matrix of equations
np + ms = t mod N, t = 0 : 3, is calculated as follows:
0 2 0 2
1 3 1 3
||t = (n · 1 + m · 2) mod 4||n,m=0:3 = .
2 0 2 0
3 1 3 1
Image Processing 23
0 1 0 0 2 4 1 2
and similarly we obtain the next three components
f1,1,1 = χ1,1,1 ◦ f = 2 + 2 + 2 + 1 = 7
f1,1,2 = χ1,1,2 ◦ f = 1 + 0 + 1 + 2 = 4 (1.48)
f1,1,3 = χ1,1,3 ◦ f = 3 + 1 + 3 + 2 = 9.
Thus, the splitting-signal fT1,1 = {8, 7, 4, 9}. The four-point DFT of this signal
equals (A0 , A1 , A2 , A3 ) = (28, 4 + 2j, −4, 4 − 2j), which defines the 2-D DFT
of f at the frequency-points (0, 0), (1, 1), (2, 2), and (3, 3). At this step, we can
write the other three values of the 2-D DFT as follows:
F0 F1 F2 F3 28 1 − j −6 1 + j
0 A1 0 0 0 4 + 2j 0 0
0 0 A2 0 = 0
.
0 −4 0
0 0 0 A3 0 0 0 4 − 2j
Image Processing 25
The first component, A0 , equals F0 = 28, and could be omitted from the
calculations to avoid the redundancy. The redundancy of calculation takes
place for other splitting-signals not only at frequency-point (0, 0), but at
frequency-points with even coordinates, i.e., in the quarter of all frequency-
points, and that can be seen in Figure 1.8.
FIGURE 1.8
The disposition of frequency-points of six groups T of the covering σ of X4,4 .
0 0 0 A3 0 0 0 4 − 2j
It is clear, that the incomplete four-point DFT is required, to avoid calcula-
tions for components B0 and B2 , which have already been calculated.
We continue the calculation of the 2-D DFT. The four-point DFT of
the splitting-signal fT3,1 = {5, 7, 7, 9} equals (C0 , C1 , C2 , C3) = (28, −2 +
2j, −4, −2 − 2j). It defines the 2-D DFT of f at the frequency-points
(0, 0), (3, 1), (2, 2), and (1, 3). At this step, we can record two new values of
the 2-D DFT as follows:
F0 F1 F2 F3 28 1 − j −6 1+j
0 A1 0 C3 0 4 + 2j 0 −2 − 2j
0 B1 A2 B3 = 0 −3 + j −4 −3 − j .
0 C1 0 A3 0 −2 + 2j 0 4 − 2j
For this signal, the incomplete four-point DFT is required to avoid calculations
for components C0 and C2 , which have already been calculated in the second
step of our calculations (when (p, s) was (1, 1)).
The remaining five values of the 2-D DFT will be calculated by
the splitting-signals corresponding to the generators (1, 0) and (1, 2). The
splitting-signal fT1,0 = {7, 4, 8, 8}. The four-point DFT of this signal equals
(D0 , D1 , D2 , D3 ) = (28, −1 + 5j, 2, −1 − 5j) and defines the 2-D DFT of f at
26 CHAPTER 1: 2-D DFT
the frequency-points (0, 0), (1, 0), (2, 0), and (3, 0). At this step, we can record
three new values of the 2-D DFT as follows:
F0 F1 F2 F3 28 1 − j −6 1+j
D1 A1 0 C3 −1 + 5j 4 + 2j 0 −2 − 2j
D2 B1 A2 B3 =
.
2 −3 + j −4 −3 − j
D3 C1 0 A3 −1 − 5j −2 + 2j 0 4 − 2j
The redundancy of calculation on this step is only at (0, 0). At the last step,
the four-point DFT of the splitting-signal fT1,2 = {7, 9, 8, 4} is calculated. It
equals (E0 , E1, E2 , E3 ) = (28, −1 − 5j, 2, −1 + 5j) and defines the 2-D DFT of
f at the frequency-points (0, 0), (1, 2), (2, 0), and (3, 2). We fill the 2-D DFT
with the values of E1 and E2 ,
2 3 2 3 2 3
F0 F1 F2 F3 28 1−j −6 1+j F0,0 F0,1 F0,2 F0,3
7 = 6 −1 + 5j 4 + 2j −1 − 5j −2 − 2j 7 = 6 F1,0
6 D1 A1 E1 C3 7 6 7 6 F1,1 F1,2 F1,3 7
6 7.
4 D2 B1 A2 B3 5 4 2 −3 + j −4 −3 − j 5 4 F2,0 F2,1 F2,2 F2,3 5
D3 C1 E3 A3 −1 − 5j −2 + 2j −1 + 5j 4 − 2j F3,0 F3,1 F3,2 F3,3
Example 1.10 (Image 256 × 256) Figure 1.10 illustrates the image 256 ×
256 in part a, along with the 1-D DFT over the image-signal fT1,3 of length
256 in c, and the magnitude spectrum of the image in d. Three bright parallel
lines on the spectrum show the samples at points of the group T1,3 at which
the 2-DFT of the image is the 1-DFT of the image-signal.
The 2-D DFT at samples at this group has been amplified, in order to see
the location of the group and directions of the projection, along which the
components of the tensor are calculated as sums of line-integrals. The image
after amplifying the 2-DFT at samples of the group T1,3 is shown in part b.
The effect of amplifying those spectral components illustrates the meaning of
Equation (1.21). The projections are calculated at angle ψ = 18.4349◦ and the
1-D DFT fills the 2-D DFT along three lines at angle θ = 90 − ψ = 71.5651◦.
Image Processing 27
176
174
fT (t)
16,1
172
170
t
168
0 50 100 150 200 250
(a) (b)
43885
150
F0=43885
200
100
150
100
50
50
0 200
200 100 p1
0 p2 100
0 50 100 150 200 250 0 0
(c) (d)
FIGURE 1.9
(a) The image 256 × 256, (b) image-signal corresponding to the generator
(p1 , p2 ) = (16, 1), (c) absolute spectrum of the image-signal (with the trun-
cated zero component), and (d) the arrangement of values of the 1-D DFT in
the 2-D DFT of the image (in the 3-D view).
Example 1.11 (Image 512 × 512) Figure 1.11 illustrates the image of size
512 × 512 in part a, along with the splitting-signal fT3,1 of length 512 in b, the
1-D DFT over this splitting-signal in c, and points of the subset T3,1 at which
the 2-D DFT of the image is filled by the 1-D DFT in d. The image is the
max-image of stacked fluorescent in situ hybridization (FISH) images arising
from normal glands. In general, the image f is real and components fp,s,t can
be considered to be coefficients of decomposition of the 2-D DFT in the group
Tp,s by the cos(ωx)- and sin(ωx)-waves with the frequency ω = 2πt/N. In
the 3-D representation fn,m → fp,s,t , two dimensions correspond to frequency
(p, s) and one dimension refers the time coordinate t of the signal fTp,s .
90°
ψ θ
(a) (b)
50
1−D DFT of fT
40 1,3
amplitude
30
20
10
0
0 50 100 150 200 250
ω
(c) (d)
FIGURE 1.10
(a) Image 256 × 256. (b) Image after amplifying the 2-DFT at samples of
the group T1,3 . (c) Absolute value of the 1-D DFT of the image-signal fT1,3
(zero component is shifted to the center and truncated). (d) 2-D DFT of the
image with amplified samples at the group T1,3 . Angles ψ = 18.4349◦ and
θ = 71.5651◦.
46
44
42
40
38
0 100 200 300 400 500
(a) (b)
150
DFT(0)=2233
100
T3,1
50
0
0 100 200 300 400 500
(c) (d)
FIGURE 1.11
(a) FISH image, (b) the splitting-signal fT3,1 , (c) 1-D DFT of the splitting-
signal (in absolute scale and shifted), and (d) arrangement of values of the
1-D DFT in the 2-D DFT of the image at frequency-points of the set T3,1 .
of the square lattice XN,N can be implemented in the following way [48]. We
first define the set BN = {n ∈ XN ; g.c.d.(n, N ) > 1} and function β(p), which
equals the number of elements s ∈ BN being coprime with p and such that
ps < N. Then the set of generators can be defined as follows:
N−1
[ [ [ [ [
J= (p, 1) 1, s) (p, s) . (1.52)
p=0 s∈BN p,s∈BN , g.c.d.(p,s)=1, p,s≤N
The number of generators in this set, or the number of 1-D DFTs required to
calculate the 2-D N × N -point DFT equals
X
card σJ = 2N − φ(N ) + β(p) (1.53)
p∈BN
where we denote the Euler’s function by φ(N ), that is, the number of positive
integers P
that are smaller than N and coprime with N. It is easy to verify, that
φ(N ) ≥ {β(p); p ∈ BN }, so that card σ ≤ 2N.
FIGURE 1.12
Arrangement of frequency-points of groups Tp1 ,p2 covering the lattice X3,6 .
The locations of frequency-points of the five cyclic groups Tp,s of the covering
are shown in Figure 1.13.
The groups are intersected only at 12 frequency-points with even coordi-
nates. Therefore, the transformation F6,8 can be split by one 24-point DFT,
two incomplete 24- and 12-point DFTs, and two incomplete six-point DFTs.
These incomplete DFTs are not calculated for the components with even
points, and, therefore, they can be reduced to calculation of the DFTs of
twice smaller orders. Thus the 6 × 8-point DFT can be split by the 24-, 12-,
32 CHAPTER 1: 2-D DFT
6 6 6 6 6
4 4 4 4 4
2 2 2 2 2
0 0 0 0 0
0 5 0 5 0 5 0 5 0 5
FIGURE 1.13
Arrangement of frequency-points of groups Tp,s covering the lattice X6,8 .
and 6-point DFTs, and two 3-point DFTs, and the redundancy of calculations
in the tensor algorithm will be removed.
where p = 0 : (N − 1).
In matrix form, the DFT in the space R2N is described by the following
matrix 2N × 2N :
I I I I I I
I T 1 T 2 T 3 · · · T N−1
2
X= I T T 4 T 6 · · · T N−2 . (1.56)
I · · · · · · · · · · · · · · ·
I T N−1 T N−2 T N−3 T1
The (n, p)-th blocks 2 × 2 of this matrix is T np, where n, p = 0 : (N − 1). The
matrix I = I2 is the identity matrix 2 × 2. The rotation matrices T k compose
a one-parametric group with period N. In other words
T k1 +k2 = T k1 T k2 , (T 0 = T N = I),
by the twice larger angle 2ϕp , or twice faster, than the point (r1 , i1 ), and so on.
Then the coordinates of all rotated points are added and one point is defined,
which represents the DFT at frequency-point p. For p = 0, there is no rotation;
the sums of coordinates of the original points define the component F0 .
Example 1.14 Consider the vector-signal of length 10 with the following real
and imaginary parts:
This signal is plotted in the form of ten points on the plane in Figure 1.14. The
points are numbered and ten circles on which they lie are shown. The figure
6
7
2
imaginary part y(n) of the signal z(n)=x(n)+jy(n)
4
9
5
2
1 F(0)
0
8
0
−2
3
−4
6
−6
−8
−8 −6 −4 −2 0 2 4 6 8
FIGURE 1.14
Calculation of the first component of the DFT, F0 .
also shows projections of all points of the signal on the X-axis and Y -axis
(shown by dash lines) and their sums (by x), and the point F0 = (−0.4, 1.1)
(by the bullet with label F0 ). The coordinates of F0 are normalized by the
factor of N = 10, i.e., F0 /10.
Image Processing 35
10−point DFT composition: component F(1).
8
6
9
6
2
F(0)
7
0
1
F(1)
5 0
−2
3
−4
4
−6
8
−8
−8 −6 −4 −2 0 2 4 6 8
In the next stage of the DFT calculation, points of the signals are rotated as
shown in Figure 1.15, and the sums (normalized by 10) of projections of the ro-
tated points on the X-axis and Y -axis define the point F1 = (0.0684, −0.6155).
Similarly, these ten points are rotated eight more times, and during these
rotations the sums of coordinates of ten points overlay a new set of ten points
with the following coordinates:
6
7
imaginary part y(n) of the signal z(n)=x(n)+jy(n) 2
4
9
5
2
1 F(0)
−4
6
−6
−8
−8 −6 −4 −2 0 2 4 6 8
In the real space R2N , the N -point IDFT of {Fp; p = 0 : (N −1)} is represented
as
N−1 N−1
rn 1 X −np Rp 1 X cos(nϕp ) − sin(nϕp ) Rp
f̄n = = T = ,
in N p=0 Ip N p=0 sin(nϕp ) cos(nϕp ) Ip
where n = 0 : (N − 1).
The illustration of the IDFT is similar to the DFT, but is a clock-wise
rotation, i.e., in the direction opposite to the rotation in the DFT. If the
projections of all rotated points have been not normalized for the DFT, then
after rotating the points, the sums of the coordinates of rotated points are
normalized by the factor of N. Thus, if we start with the ten points {Fp ; p =
0 : 9} in the above considered example, as shown in Figure 1.16, the sequential
clockwise rotations of these points around the circles, on which they lie, define
the original signal, i.e., ten points with coordinates
DFT component, F(p), at frequency−point p=1 DFT component, F(p), at frequency−point p=2
100 100
80 80
60 60
40 40
20 20
0 0
−20 −20
−40 −40
−60 −60
−80 −80
−100 −100
−100 −80 −60 −40 −20 0 20 40 60 80 100 −100 −80 −60 −40 −20 0 20 40 60 80 100
FIGURE 1.17
DFT components F1 and F2 .
DFT component, F(p), at frequency−point p=3 DFT component, F(p), at frequency−point p=4
100 100
80 80
60 60
40 40
20 20
0 0
−20 −20
−40 −40
−60 −60
−80 −80
−100 −100
−100 −80 −60 −40 −20 0 20 40 60 80 100 −100 −80 −60 −40 −20 0 20 40 60 80 100
FIGURE 1.18
DFT components F3 and F4 .
When fn,m is a real image and of size N × N, all its N 2 first points are
38 CHAPTER 1: 2-D DFT
DFT component, F(p), at frequency−point p=66 DFT component, F(p), at frequency−point p=67
100 100
80 80
60 60
40 40
20 20
0 0
−20 −20
−40 −40
−60 −60
−80 −80
−100 −100
−100 −80 −60 −40 −20 0 20 40 60 80 100 −100 −80 −60 −40 −20 0 20 40 60 80 100
FIGURE 1.19
DFT components F66 and F67.
DFT component, F(p), at frequency−point p=115 DFT component, F(p), at frequency−point p=120
100 100
80 80
60 60
40 40
20 20
0 0
−20 −20
−40 −40
−60 −60
−80 −80
−100 −100
−100 −80 −60 −40 −20 0 20 40 60 80 100 −100 −80 −60 −40 −20 0 20 40 60 80 100
FIGURE 1.20
DFT components F115 and F120 .
located on the real line and then are rotated, step-by-step, N 2 times in the
plane R2 . The process of rotation of all points is more complicated when
comparing with the N -point DFT. For instance, the point f1,1 is rotated as
W p+s f1,1 , i.e.,
f1,1 → W 1 f1,1 → W 2 f1,1 → W 3 f1,1 → ... → W N−1 f1,1
for components F1,0 , F2,0, F3,0, ..., FN−1,0, as well as for components F0,1 , F0.2,
Image Processing 39
F0,3 , ..., F0,N−1 , and also rotated as f1,1 → W 2 f1,1 → W 3 f1,1 → W 4 f1,1 →
... → f1,1 for components F1,1 and F2,1, F3,1 , ..., FN−1,1, and so on. This pro-
cess of rotation of point f1,1 is fulfilled when combined with other points fn,m ,
that are rotated as W np+ms fn,m , where (p, s) ∈ X \ (1, 1).
In tensor representation, one can describe the entire picture of rotation, or
the geometry of all components of the 2-D DFT. Indeed, the image N × N is
the set of splitting-signals of length N each, and the process of rotation of the
splitting-signal generated by frequency-point (p, s) describes the 2-D DFT at
frequency-points of the corresponding group Tp,s .
Problems
Problem 1.1 Consider the following image: {fn,m = (n + m) mod 6, n = 0 :
7, m = 0 : 3.} Determine the number of splitting-signals that describe the
image in tensor representation. Calculate the tensor transform and plot all
splitting-signals of the image.
Problem 1.2 Consider the tree image of size 257 × 257 in tensor represen-
tation. Calculate and plot two splitting-signals generated by frequency-points
(1, 2) and (17, 34). Express one signal in terms of another signal.
Problem 1.3 For the tree image of size 256 × 256, calculate and plot the
splitting-signal generated by frequency-point (1, 7). Compute the 1-D DFT
of the splitting-signal. In the lattice 256 × 256, show the frequency-points at
which the 2-D DFT of the image is defined by this splitting-signal.
Problem 1.4 Consider the tree image of size 256 × 256 and its 2-D DFT in
tensor representation.
A. Calculate and sketch the splitting-signal of the (1, 13)-projection.
B. Assume that the (1, 12)-projection is not calculated, or is not available.
(i) How would the tree image be changed if the splitting-signal of
the (1, 12)-projection was substituted by the splitting-signal of the (1, 13)-
projection?
(ii) How would the tree image be changed if the splitting-signal of the
(1, 12)-projection was substituted by the zeros?
Problem 1.5 Consider the tree image of size 256 × 256 in tensor representa-
tion.
A. Remove the horizontal, vertical, and diagonal projections from the set
of projections. Calculate and show the image reconstructed by the remaining
255 projections.
B. Calculate and sketch the image reconstructed only by three projections,
which are the horizontal, vertical, and diagonal projections.
40 CHAPTER 1: 2-D DFT
130
120
110
100
0 50 100 150 200 250
(a) (b)
FIGURE 1.21
(a) Tree image and (b) the splitting-signal generated by (p, s) = (2, 1).
Use the concept of the 1-D DFT in the real space and sketch the geometry
of components F1 , F2 , F3 , F83, F110, and F127 of the 256-point DFT of the
splitting-signal. Discuss the reconstruction of the splitting-signal from the
geometry of any of these components.
2
Direction Images
41
42 CHAPTER 2: Direction Images
together, the sets Vp1 ,p2 ,t , t = 0 : (N − 1), compose a partition of the period
X. It is interesting to note, that the direction of parallel lines of Lp1 ,p2 ,t is
perpendicular to the direction of frequency-points of the cyclic group Tp1 ,p2 .
Example 2.1 (Lattice 8 × 8) On the lattice X8,8 , we consider two sets of
parallel lines L2,1,1 and L2,1,2. Each family contains three parallel lines. For
the family L2,1,1, the parallel lines are
y1 : 2x + y = 1, y9 : 2x + y = 9, y17 : 2x + y = 17.
One point (0, 1) of the set V2,1,1 lies on the first line of L2,1,1, four points
(1, 7), (2, 5), (3, 3), (4, 1) on the second line, and three points (5, 7), (6, 5), (7, 3)
on the third one. Therefore, f2,1,1 = (x0,1) + (x1,7 + x2,5 + x3,3 + x4,1 ) + (x5,7 +
x6,5 + x7,3 ). The parallel lines of the family L2,1,2 are defined by
and the component f2,1,2 = (x0,2 +x1,0 )+(x2,6 +x3,4 +x4,2 +x5,0 )+(x6,6 +x7,4 ).
The disposition of the points lying on the parallel lines of these sets is given
4 4 4
l1
2 2 2
0 0 0
0 2 4 6 8 0 2 4 6 8 0 2 4 6 8
y1 y9 y17 y2 y10 y18
FIGURE 2.1
The locations of points of sets V2,1,1 and V2,1,2 and frequency-points of the
group T2,1 .
in Figure 2.1. The location of the frequency-points of the group T2,1 is also
shown in this figure. Two parallel lines pass through these frequency-points,
which are defined in the frequency plane (w1 , w2 ) as l1 : 2w2 − w1 = 0 and
l2 : 2w2 − w1 = 8. The parallel lines l1 and l2 are perpendicular to the parallel
lines yn of L2,1,1 and L2,1,2 , as well as all other families L2,1,t, t = 0, 3 : 7.
The disposition of the points of all disjoint eight sets V2,1,t , when t = 0 : 7,
is given in Figure 2.2.
We can identify the opposite sides of boundaries of the square Y = [0, N ]×
[0, N ] and consider Y as a torus and the 2-D lattice X as a net traced on the
Image Processing 43
FIGURE 2.2
The disposition of eight sets of points, V2,1,t , t = 0 : 7 (shown by filled circles).
torus in the 3-D space. Then, the straight lines of Lp1 ,p2 ,t will compose a
closed spiral St = Sp,s,t on the torus. As an example for N = 32, Figure 2.3
shows the location of points of sets V1,1,3 and V1,1,7 on the square grid 32 × 32
in parts (a) and (b), respectively. Each set is located on two parallel lines.
V1,1,3 V1,1,7
30 30
25 25
20 20
15 15
10 10
5 5
0 0
0 5 10 15 20 25 30 0 5 10 15 20 25 30
(a) (b)
FIGURE 2.3
The sets (a) V1,1,3 and (b) V1,1,7 on the lattice 32 × 32.
We now consider the same sets on the discrete torus. Figure 2.4 shows the
locus of two spirals S3 and S7 on the net, for (p, s) = (1, 1). They correspond
respectively to the parallel straight lines of families L1,1,3 and L1,1,7 described
by (2.1). The sums {fp1 ,p2 ,t ; t = 0 : (N − 1)}, calculated on N parallel spirals
St , t = 0 : (N −1), represent the image fn1 ,n2 in the group Tp1 ,p2 of frequency-
44 CHAPTER 2: Direction Images
S
1,1,7
S
1,1,3
−5
10
10
5
5
0
0
−5
−5
−10 −10
points. These points lie on the spiral that passes through the initial point (0, 0)
of the net and make an angle π/2 with the spirals St .
Each image-signal is the set of discrete integrals along the family Lp1 ,p2 ,t
of parallel lines. Therefore, the processing of the image-signal fT yields the
change in the Fourier transform at frequency-points of the corresponding cyclic
group Tp1 ,p2 . After performing the inverse 2-D discrete Fourier transform, the
corresponding change might be observed in the image along the parallel lines
of sets Vp1 ,p2 ,t , t = 0 : (N − 1). As an example, Figure 2.5 shows the tree
image of size 256 × 256 in part a, along with the results of amplifying only
one image-signal fT2,1 by the factor of 4 in b, and signal fT5,1 by the factor
of 6 in c. The directions of parallel lines of the corresponding families L2,1,t,
and L5,1,t, t = 0 : 255, on the image can easily be observed.
FIGURE 2.5
(a) Tree image before and after processing by the image-signals (b) fT2,1 and
(c) fT5,1 .
The tensor transform can be used for calculating and processing the 2-D
discrete Fourier transform (DFT) of the image, since each of splitting-signal
fTp,s defines the 2-D DFT of the image at frequency-points of the cyclic group
Tp,s . The image can thus be calculated from the tensor transform, by using
the inverse 2-D DFT. The image can also be reconstructed directly from its
tensor transform, without calculating the inverse 2-D DFT. The splitting-
signals define unique direction components of the image.
As an example, Figure 2.6 shows the bridge image 256 × 256 extended to
the size 257 × 257 in part a, along with the image of all 258 splitting-signals
in b, the set of 1-D DFTs of these splitting-signals in c, which represent the
2-D DFT of the image shown in d. The splitting-signals and their DFTs are
(a) image (b) 2−D TT (c) 1−D DFTs (d) 2−D DFT
FIGURE 2.6
(a) Image 257 × 257, (b) image of 258 splitting-signals, (c) image of 258 257-
point DFTs of the splitting-signals, and (d) 2-D DFT of the image. (All DFTs
are shown in absolute mode.)
written row-wise in images each of size 258 × 257 in (b) and (c), respectively.
These images can be reduced to the original size 257 × 257. Indeed, the sum
46 CHAPTER 2: Direction Images
of all components of the splitting-signals is equal to the sum of the image, i.e.,
N−1
X X N−1
N−1 X
fp,s,t = f0,0,0 = fn,m .
t=0 n=0 m=0
n1 , n2 = 0 : (N − 1).
(2.3)
Since the splitting-signal fTp,s determines the 2-D DFT of the image at
frequency-points of the group T = Tp,s ,
Original image
140
135
130
125
120
110
0 50 100 150 200 250
(a) (b)
250
200
100
50
0
0 50 100 150 200 250
(c)
(d) DI−(1,5)
FIGURE 2.7
(a) The image 257 × 257, (b) the splitting-signal {f1,5,t ; t = 0 : 256}, and (c)
the 1-D DFT of the splitting-signal and frequency-points of T1,5 , and (d) the
corresponding direction image dn1,n2 (the image has been scaled).
(a), along with the splitting-signal generated by the frequency (p, s) = (1, 5)
in b. The original size 256 × 256 of the tree image was extended to the size
257 × 257, by adding a zero row and column. The 1-D DFT of the splitting-
signal in absolute scale and the location of all frequency-points of the cyclic
group T1,5 , at which the 2-D DFT of the image is defined by this splitting-
(1,5)
signal, are shown in c. The direction image dn1,n2 is illustrated in d.
(p,s)
The direction images dn1 ,n2 of the tree image, which are generated by the
frequencies (p, s) = (0, 1), (1, 1), (2, 1), ..., and (9, 1) are shown in Figure 2.8
in parts a-j, respectively.
When N is a prime, (N +1) direction signal-images are required to compose
the image fn,m . Indeed, the covering σJ = (Tp,s ; (p, s) ∈ J) consists of (N +1)
cyclic groups Tp,s . The groups T of σJ intersect only at the point (0, 0).
(p,s)
Therefore, the sum of all (N + 1) incomplete 2-D DFTs Dp1 ,p2 , (p, s) ∈ JN,N ,
equals the 2-D DFT of the image plus N times single values of the F0,0 at
48 CHAPTER 2: Direction Images
(a) DI−(0,1) (b) DI−(1,1) (c) DI−(2,1) (d) DI−(3,1) (e) DI−(4,1)
(f) DI−(5,1) (g) DI−(6,1) (h) DI−(7,1) (i) DI−(8,1) (j) DI−(9,1)
FIGURE 2.8
(a)-(j) The first ten direction images of the tree image 257 × 257. (All images
were scaled.)
point (0, 0). We denote by Op1 p2 the complex matrix with all zero coefficients,
except the first coefficient that equals O0,0 = F0,0 .
The inverse 2-D DFT of the sum of all (N + 1) incomplete 2-D DFTs can
be calculated as follows:
X X h i X
−1 −1
d(p,s)
n1,n2 = FN,N ◦ Dp,s = FN,N ◦ Dp,s
n1 ,n2
(p,s)∈JN,N (p,s)∈JN,N (p,s)∈JN,N
n1 ,n2
h i
−1
= FN,N ◦ Fp1 ,p2 + N Op1 p2
n1 ,n2
−1 −1
= FN,N ◦ Fp1 ,p2 + N FN,N ◦ Op1 p2
n1 ,n2 n1 ,n2
1
= fn1 ,n2 + F0,0 = fn1 ,n2 + N E[f].
N
(2.5)
Here E[f] denotes the mean of the image,
N−1 N−1
1 X X 1 1
E[f] = fn,m = 2 F0,0 = 2 f0,0,0 .
N 2 n=0 m=0 N N
JN,N = {(1, 0), (1, 1), (1, 2), (1, 3), ..., (1, N − 1)} ∪ {(0, 1)},
Image Processing 49
To simplify the above equation, we could assume that the image is centered
fn1 ,n2 → fn1 ,n2 − E[f]. Then, the sum of direction images equals the image,
X 1 X
fn1 ,n2 = d(p,s)
n1,n2 = fp,s,(n1p+n2 s) mod N . (2.8)
N
(p,s)∈J (p,s)∈J
JN,N = {(0, 1), (1, 1), (2, 1), (3, 1), ..., (N − 1, 1)} ∪ {(1, 0)},
FIGURE 2.9
Images 257 × 257 reconstructed by 257 projections by splitting-signals, when
the projection data of one generator (p, s) have been removed, for (p, s) equals
(a) (1, 0), (b) (1, 1), and (c) (0, 1).
The angles of the required projections for reconstructing the image of size
257 × 257 by the splitting-signals (or direction images) compose the following
set
Φ257,257 = {arctan(p); p = 0 : 257} ∪ {π/2}.
Figure 2.10 illustrates all central angles of this set on the unit circle. One
0.8 90°
0.6
°
45
0.4 26.57° °
18.43
0.2
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
FIGURE 2.10
Central angles of 258 projections for reconstructing the image 257 × 257.
can see that the points on the circle are not uniformly distributed, and the
increment of the angles is not a constant. The main part of the projections are
Image Processing 51
taken along the small angles. For instance, there are no projections for angles
in the intervals (45◦ , 90◦) and (26.57◦, 45◦), as well as (18.43◦, 26.57◦).
All basic functions are numbered in the order shown in the above equation,
i.e., the first function is χ1,0,0 , the second is χ1,0,1 , ..., the N th is χ1,1,0,
..., the N (N − 1)th is χ1,N−1,N−2 , the N (N − 1) + 1 is χ0,1,0, ..., and the
last function is χ0,1,N−1 . Thus, the triplet-number (p, s, t) corresponds to the
following number k = k(p, s, t) from the interval [0, N 2 − 1] :
(N − 1)s + t, if p = 1, and s = 0 : (N − 1), t = 0 : (N − 2),
k(p, s, t) =
N (N − 1) + t, if p = 0, and s = 1, t = 0 : (N − 1).
T
[χ5,5 ] = [χ−1
5,5 ] =
1111100000000000000000000 11111000000000000000 − 1 − 1 − 1 − 1 − 1
2 3 2 3
6 0000011111000000000000000 7 6 00000111110000000000 − 1 − 1 − 1 − 1 − 1 7
6 0000000000111110000000000 7 6 00000000001111100000 − 1 − 1 − 1 − 1 − 1 7
6 7 6 7
6 0000000000000001111100000 7 6 00000000000000011111 − 1 − 1 − 1 − 1 − 1 7
6 7 6 7
6 1000000001000100010001000 7 6 1000 − 1000 − 1100 − 1100 − 1100 − 11000 7
6 7 6 7
6 0100010000000010001000100 7 6 0100 − 1100 − 1000 − 1010 − 1010 − 10100 7
6 7 6 7
6 7 6 7
6 0010001000100000000100010 7 6 0010 − 1010 − 1010 − 1000 − 1001 − 10010 7
6 7 6 7
6 0001000100010001000000001 7 6 0001 − 1001 − 1001 − 1001 − 1000 − 10001 7
6 7 6 7
6 1000000100000010100000010 7 6 10 − 1000010 − 10 − 1001010 − 10 − 10010 7
6 7 6 7
6 0001010000001000000101000 7 6 00 − 1101000 − 10 − 1100000 − 11 − 11000 7
6 7 6 7
6 0100000010100000010000001 7 6 01 − 1000001 − 11 − 1000001 − 10 − 10001 7
6 7 6 7
6 0000101000000101000000100 7 6 00 − 1010100 − 10 − 1010100 − 10 − 10100 7
6 7 6
1 6
7
6 1000000010010000000100100 7,
6 7 5 6
100 − 100 − 10100100 − 100 − 101 − 10100 7
7.
6 0010010000000100100000001 7 6 001 − 101 − 10000001 − 101 − 100 − 10001 7
6 7 6 7
6 0000100100100000001001000 7 6 000 − 110 − 11001000 − 100 − 110 − 11000 7
6 7 6 7
6 0100000001001001000000010 7 6 010 − 100 − 10010010 − 110 − 100 − 10010 7
6 7 6 7
6 1000001000001000001000001 7 6 1 − 100001 − 100001 − 100001 − 1 − 10001 7
6 7 6 7
6 0000110000010000010000010 7 6 0 − 100110 − 100010 − 100010 − 1 − 10010 7
6 7 6 7
6 0001000001100000100000100 7 6 0 − 101000 − 101100 − 100100 − 1 − 10100 7
6 7 6 7
6 0010000010000011000001000 7 6 0 − 110000 − 110000 − 111000 − 1 − 11000 7
6 7 6 7
6 1000010000100001000010000 7 6 00000 00000 00000 00000 50000 7
6 7 6 7
6 0100001000010000100001000 7 6 −11000 − 11000 − 11000 − 11000 41000 7
6 7 6 7
6 0010000100001000010000100 7 6 −10100 − 10100 − 10100 − 10100 40100 7
6 7 6 7
4 0001000010000100001000010 5 4 −10010 − 10010 − 10010 − 10010 40010 5
0000100001000010000100001 −10001 − 10001 − 10001 − 10001 40001
A simple analytical formula can be derived for basic functions of the inverse
tensor transform (ITT). To show that, we number the basic functions of the
ITT by the same triplets (p, s, t) ∈ U and preserve their orders as in the
forward TT. Then the following holds:
χp,s,t (n, m) − χp,s,N−1 (n, m)
1 if p = 1, s = 0 : (N − 1), t = 0 : (N − 2),
χ−1
p,s,t (n, m) = (2.14)
N χ (n, m) − χp,s,0 (n, m) + N δN−1,0 (n, m)
p,s,t
if p = 0, s = 1, t = 0 : (N − 1),
and
0 0 0 0 0 0 1
0 1 0 0 0 0 0
0 0 0 1 0 0 0
[χ1,5,3] − 7[χ−1
1,5,3] = [χ1,5,6] = 0 0 0 0 0 1 0 ,
1 0 0 0 0 0 0
0 0 1 0 0 0 0
0 0 0 0 1 0 0
−1 1
or [χ1,5,3] = 7 [χ1,5,3] − [χ1,5,6] .
One also can see that for the 35-th basic function, we have the following:
0 0 0 0 1 0 0 0 0 0 0 1 0 −1
0 0 0 0 0 0 1 0 −1 0 0 0 0 1
0 1 0 0 0 0 0 0 1 0 −1 0 0 0
[χ1,5,4] − 7[χ−1
1,5,4] = 0 0 0 1 0 0 0 − 0 0 0 1 0−1 0 = [χ1,5,6],
0 0 0 0 0 1 0 −1 0 0 0 0 1 0
1 0 0 0 0 0 0 1 0 −1 0 0 0 0
0 0 1 0 0 0 0 0 0 1 0 −1 0 0
or [χ−1 1
1,5,4] = 7 [χ1,5,4] − [χ1,5,6] .
Now we consider the triplet-number (p, s, t) = (0, 1, 2). This number cor-
responds to the row number k = k(0, 1, 2) = 45. The basic functions of the
direct and inverse tensor transform with number (0, 1, 2) equal, respectively,
0 0 0 0 0 0 0 −1 −1 −1 −1 −1 −1 6
0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1
−1 1
0 0 0 0 0 0 0 , [χ0,1,2] = 7 0 0 0 0 0 0 0 ,
[χ0,1,2] =
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
56 CHAPTER 2: Direction Images
and [χ−1
0,1,2] =
1
7 [χ0,1,2] − [χ0,1,0] + [δ6,0 ]. Indeed
1 1 1 1 1 1 1−7
0 0 0 0 0 0 0
0 0 0 0 0 0 0
[χ0,1,2] − 7[χ−1
0,1,2 ] = [χ 0,1,0 ] − 7[δ6,0 ] = 0
0 0 0 0 0 0 .
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
For the 46-th function, we have [χ−1
0,1,3] =
1
7
[χ0,1,3] − [χ0,1,0] + [δ6,0 ]. Indeed
0 0 0 0 0 0 0 −1 −1 −1 −1 −1 −1 6
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
−1
[χ0,1,3] − 7[χ0,1,3] =
1 1 1 1 1 1 1 −
1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
=[χ0,1,0] − 7[δ6,0].
10 10
20 20
30 30
40 40
10 20 30 40 10 20 30 40
(a) (b)
2 2 2
4 4 4
6 6 6
2 4 6 2 4 6 2 4 6
(c) (d) (e)
FIGURE 2.11
(a) The matrix 49 × 49 of the DTT and (b) transpose inverse matrix, (c) the
image of size 7 × 7, (d) DTT of the image, and (e) inverse DTT.
Image Processing 57
Figure 2.11 shows the binary image of the matrix [χ7,7 ] of the tensor trans-
formation in part a, along with the gray-scale image of the transpose inverse
matrix in b. The image fn,m = (n + m − 1) mod 10, n, m = 0 : 6, is shown in
c, the discrete tensor transform (DTT) of the image in d, and the inverse ten-
sor transform in e. In the image of the inverse matrix in b, the values −1, 0, 1,
and 6, 7 are shown in grays from black to white.
It is not difficult to see that the image in the round braces is constant,
N−1
X
c(n, m) = χ1,s,N−1 (n, m) + χ0,1,0(n, m) − N δN−1,0 (n, m) ≡ 1.
s=0
Thus, the inversion formula states that the image is composed as the dif-
ference
fn,m = bU (n, m) − e(f), n, m = 0 : (N − 1), (2.15)
of the backprojection
N−1
1 X X
bU (n, m) = fp,s,t χp,s,t (n, m) + f1,s,N−1 χ1,s,N−1 (n, m)
N s=0
(p,s,t)∈U
(2.16)
and the constant-image, which is the mean of the splitting-signal
N−1 N−1 N−1
1 X X 1 X
e(f) = N E(f) = fn,m = f1,0,t . (2.17)
N n=0 m=0 N t=0
58 CHAPTER 2: Direction Images
The 2nd Inverse formula for DTT (Spiral Backprojection): The image of
size N × N, when N is prime, can be calculated from the tensor transform by
1 X
fn,m = fp,s,t χp,s,t (n, m) − e(f), n, m = 0 : (N − 1). (2.18)
N
(p,s,t)∈U 0
for t=0:N-2
A=matrix_pst(N,p,s,t); TT_matrix(k,:)=reshape(A,1,N49);
fprintf(’ %g tensor matrix for (%g,%g,%g) \n’,k,p,s,t);
k=k+1;
end
end
s=1; p=0;
for t=0:N-1
A=matrix_pst(N,p,s,t); TT_matrix(k,:)=reshape(A,1,N49);
fprintf(’ %g tensor matrix for (%g,%g,%g) \n’,k,p,s,t);
k=k+1;
end
TT_imatrix=inv(TT_matrix)*N; % (*N) can be removed *
% Calculate TT:
% Example with the following original image:
% 1 2 3 4 5 6 7
% 2 3 4 5 6 7 8
% 3 4 5 6 7 8 9
% 4 5 6 7 8 9 0
% 5 6 7 8 9 0 1
% 6 7 8 9 0 1 2
% 7 8 9 0 1 2 3
for n=1:N
for m=1:N
image_1(n,m)=mod(n+m-1,10);
end
end
signal_1=reshape(image_1,N49,1);
signal_xx=TT_matrix*signal_1;
XX=reshape(signal_xx,N,N);
% XX is the TT of the image_1
% 28 49 29 29 29 29 28
% 35 9 39 39 39 29 35
% 42 19 39 39 29 29 42
% 39 29 39 29 29 39 39
% 36 39 29 29 39 39 36
% 33 29 29 39 39 39 33
% 49 29 39 39 39 39 30 * the last s-signal
% sum(sum(XX(1:7,7)))=243=sum(sum(image_1))
% --------------------------------------------------------------
% Check if the inverse TT is correct:
signal_2=round(TT_imatrix*signal_xx/N); % (/N) can be removed *
image_2=reshape(signal_2,N,N); % it equals image_1
% --------------------------------------------------------------
% The image reconstruction by the derived formulas (2.15)-(2.18)
fprintf(’ Inverse Tensor transform (%g,%g) \n’,N,N);
% TT is the vector-signal ’signal_xx’ of length 49.
B=zeros(N);
p=1; k=1;
60 CHAPTER 2: Direction Images
for s=0:N-1
for t=0:N-2
A=matrix_pst(N,p,s,t); B=B+signal_xx(k)*A; k=k+1;
end
end
s=1; p=0;
for t=0:N-1
A=matrix_pst(N,p,s,t); B=B+signal_xx(k)*A; k=k+1;
end
% Consider additional N matrices (and coefficients)
for s=0:N-1
A=matrix_pst(N,1,s,N-1);
TT=sum(sum(A.*image_1)); % i.e. f_{1,s,N-1}
B=B+TT*A;
end
B=B/N;
C=B-sum(sum(image_1))/N; % image reconstruction
%%%%%%%%%%%%%%%%%%%%%%% End of the code %%%%%%%%%%%%%%%%%%%%%%%%%
% Call: matrix_pst.m / Artyom Grigoryan, 1997.
function A=matrix_pst(N,p,s,t)
if t>N t=mod(t,N); end
A=zeros(N,N);
ms=0;
for m=1:N
np=0;
for n=1:N
t1=np+ms; t1=mod(t1,N); if t1==t A(m,n)=1; end
np=np+p;
end
ms=ms+s;
end
describe uniquely the original image and, at the same time, they split the ma-
thematical structure of the 2-D discrete Fourier transform (shown in c) into
a set of separate 1-D transforms (shown all together as an image in d). The
50
100
150
200
250
300
350
(a)
50 100 150 200 250
(b)
50
100
50
150
100
200
150
250
200
300
250
50 100 150 200 250
350
(c)
50 100 150 200 250
(d)
FIGURE 2.12
Conventional and tensor representation of the image and its spectrum. (a)
Image 256 × 256, (b) the image of all 384 splitting-signals, (c) the 256 × 256-
point DFT of the image, and (d) the image of the 256-point DFTs of splitting-
signals. (DFTs are in absolute scale and shifted to the centers.)
2-D DFT is thus considered as a unique set of separate 1-D DFTs. The image
in b is the tensor representation of the image, or the tensor transform of the
image,
χ = χσ : f → {fTp,s ; Tp,s ∈ σJ }. (2.19)
62 CHAPTER 2: Direction Images
One can note that a few splitting-signals are well expressed, which can be
seen also from the energy plot of all splitting-signals, which is given in Fi-
gure 2.13. For this image, the high energy is concentrated in the splitting-
1500
1000
500
0
0 50 100 150 200 250 300 350
FIGURE 2.13
Energy of all 384 splitting-signals of the tree image.
signals of numbers 1, 129, 257, 172, 52, 258, and 2, which correspond to the
generators (p, s) = (0, 1), (128, 1), (1, 0), (171, 1), (51, 1), (1, 2), and (1, 1), res-
pectively. The processing of only these signals may lead to good results, for
instance in image enhancement [49, 50, 52]. One such example is shown in Fi-
gure 1.4, when the image is enhanced by one splitting-signal of the generator
(p, s) = (7, 1). However, all together the splitting-signals contain 384 × 256
points, which is much greater than the original size 256 × 256.
In order to remove such redundancy, we consider the concept of the paired
representation of images. Unlike the tensor representation, the paired rep-
resentation allows for distributing the spectral information of the image by
disjoint sets of frequency-points. This property makes the paired representa-
tion the most attractive in image processing, as well as in developing effective
algorithms for calculating the 2-D DFT transform.
covering σJ of the lattice XN,N , and for each generator (p, s) ∈ J, we determine
the characteristic functions of the sets Vp,s,t = {(n1 , n2 ); n1 p + n2 s = t mod
N },
1; (n1 , n2 ) ∈ Vp,s,t ,
χp,s,t (n1 , n2 ) = t = 0 : (N − 1). (2.20)
0; otherwise,
These functions describe the tensor transformation of the 2-D image f,
X N−1
N−1 X
fp,s,t = χp,s,t ◦ f = χp,s,t (n1 , n2 )fn1 ,n2 , t = 0 : (N − 1). (2.21)
n1=0 n2 =0
where the time parameter t runs integers from the interval [0, N/2 − 1]. Thus,
the pair of elements of the tensor representation, fp,s,t and fp,s,t+N/2 , defines
0
fp,s,t .
As an example, Figure 2.14 shows the image in part a, along with the
tensor splitting-signal {f1,4,0 , f1,4,1, f1,4,2, f1,4,3, . . . f1,4,255} of length 256 in
0 0 0 0
b, and paired splitting-signal {f1,4,0 , f1,4,1 , f1,4,2 , . . . f1,4,127} of length 128 in
c. The signals are generated by the frequency-point (p, s) = (1, 4).
1.5
6.5
1
6 0.5
5.5 0
−0.5
5
−1
(a) 0 100 200 0 50 100
(b) (c)
FIGURE 2.14
(a) Image 256 × 256, (b) splitting-signal fT1,4 , and (c) splitting-signal fT1,4
0 .
The selection of this set U allows us to consider the 2-D paired transform
as the representation of the 2-D image as the set of complete splitting-signals.
It means the paired transform is written as
r−1
[ [ n o
0 0 n+1
{fp,s,t ; (p, s, t) ∈ U } = fp,s,2 n t ; t = 0 : (N/2 − 1)
n=0 (p,s)∈2n JN/2n ,N/2n
∪ {f0,0,0},
(2.28)
Image Processing 65
The higher the frequency (p, s), i.e., 2n = g.c.d.(p, s), the shorter the splitting-
signal, and the time 2n t runs the interval [0, N/2 − 1] faster; with the step
2n . In the collection of the splitting-signals, there are 3N/2 signals of length
N/2 each, 3N/4 signals of length N/4 each, and so on. The total number of
splitting-signals, or generators (p, s) equals 3N − 2.
It follows directly from the definition of the set U, that the set of frequency-
points (p, s) of splitting-signals of the paired transform is defined as
( r−1 )
[
0 n
JN,N = 2 JN/2n ,N/2n ∪ {(0, 0)},
n=0
7 15
6
5 10
4
3
2 5
1
0 0
0 2 4 6 0 5 10 15
(a) N = 8 (b) N = 16
FIGURE 2.15
Sets of (3N − 2) generators (in red) of paired splitting-signals.
Figure 2.16 shows the tomo image 256 × 256 in part a, along with the
66 CHAPTER 2: Direction Images
350
n
u 150
m
b
e 100
r
50
128 64 32 16 8 4 ..
signal length
(a) {fn,m } 0
(b) {fp,s,t }
FIGURE 2.16
(a) Image and (b) splitting-signals of lengths 128, 64, 32, 16, 8, 4, 2, 1, 1.
totality of 766 paired splitting-signals of the image in b. The first 384 splitting-
0 ; (p, s) ∈ J256,256} of length 128 each are shown in the form of
signals {fTp,s
the image 384 × 128. The next 192 splitting-signals {fTp,s 0 ; (p, s) ∈ 2J128,128}
of length 64 each are shown in the form of the image 192 × 64, and so on.
The splitting-signals of the same length are united and separated from others
according to the order of the paired transform components, which is given in
the definition of the set U. The whole picture represents the paired transform of
the tomo image. The set of all splitting-signals composing the paired transform
of the image can be packed into the original form, the square matrix 256×256,
as shown in Figure 2.17. All splitting-signals of length 128 are written in three
squares 128 × 128 of the matrix. All splitting-signals of length 64 are written
in three squares 64 × 64 of the remaining square 128 × 128, and so on.
FIGURE 2.17
766 splitting-signals of lengths 128, 64, 32, 16, 8, 4, 2, 1, 1.
N/2−1
X (m+ 21 )t
s s 0
Fm = FN/2 ◦f Tp,s
0 = fp,s,t WN/2 , m = 0 : N/2 − 1,
m
t=0
for m = 0 : (N/2 − 1). The sum in this equation represents the N/2-point
DFT of the modified splitting-signal
0 0 0 0
gTp,s
0 = {fp,s,0 , fp,s,1 W 1 , fp,s,2 W 2 , . . . , fp,s,N/2−1 W N/2−1 }.
Thus the 2-D DFT of the image fn,m at frequency-points of the subset
n o
0
Tp,s = (p, s), (3p, 3s), , (5p, 5s) . . . , ((N − 1)p, (N − 1)s) (2.31)
20 Re g’T
3,1
10
−10
f’ T
−20 3,1
0 50 100
(a) (b)
700 200
600
500 100
400
0
300
200 200
100 100
0 200 250
0 50 100 0 50 100 150
0
(c) (d)
The N/2-point DFT in the right side of (2.30) represents the N/2n+1 -point
DFT of the splitting-signal fTp,s
0 modified by the vector of rotated coefficients
t n+1
{WN/2 n ; t = 0 : (N/2 − 1)} as follows:
N/2n+1 −1
X mt
0 t
F(2m+1)p,(2m+1)s = fp,s,2 n t WN/2n WN/2n+1 (2.32)
t=0
350
300
D 250
F
T
200
n
u
m 150
b
e
r 100
50
128 64 32 16 8 4..
FIGURE 2.19
(a), (b) 2-D DFT of the image composed of the 1-D DFT of modified splitting-
signals of lengths 128, 64, 32, 16, 8, 4, 2, 1, 1.
signals of length 2r−1 each, 2r−2 3 signals of length 2r−2 each, and so on. The
summary length of all splitting-signals equals N 2 . This set of splitting-signals
is referred to as the σ 0 -representation (or the paired representation) of the
image fn,m .
TABLE 2.1
Set of orbits in the grid 8 × 8
0 0 0 0 0 0 0 0 0 0 0 0
T0,1 T1,1 T2,1 T3,1 T4,1 T5,1 T6,1 T7,1 T1,0 T1,2 T1,4 T1,6 4
0 0 0 0 0 0
T0,2 T2,2 T4,2 T6,2 T2,0 T2,4 2
0 0 0
T0,4 T4,4 T4,0 1
0
T0,0 1
The lattice is divided by 22 orbits and the orbits that are shown on the
same row have equal cardinalities, which are shown in the right column of
this table. For instance, the point (0, 1) runs around its orbit for time t = 4,
and the orbit of the point (0, 2) is twice shorter, (0, 2) → (0, 6) → (0, 2).
The set of generators of all orbits is shown in Figure 2.20 in part a, by the
0
filled circles. The locations of frequency-points of orbits Tp,s for generators
(p, s) = (1, 1), (3, 1), and (6, 1) are shown in parts b, c, and d, respectively.
6 6 6 6
4 4 4 4
2 2 2 2
0 0 0 0
0 2 4 6 0 2 4 6 0 2 4 6 0 2 4 6
(a) (b) (c) (d)
FIGURE 2.20
(a) 22 generators on the lattice 8 × 8, and the orbits of points (b) (1, 1), (c)
(3, 1), and (d) (6, 1). (The generators and elements of the orbits are shown by
the filled circles.)
The 22 splitting-signals that are defined for the generators of subsets, or or-
bits T 0 of the partition σ 0 determine values of the 2-D DFT at frequency-points
of these subsets. For instance, the signal fT1,10 carries the spectral information
Image Processing 71
of the image at frequency-points (1, 1), (3, 3), (5, 5), and (7, 7). According to
Table 2.1, the 8 × 8-point DFT is split by twelve 4-point DFTs, six 2-point
DFTs, and four 1-point DFTs (which are the identity transformations).
This table also shows how to compose the complete set of basis paired
functions. The 64 triplets (p, s, t), or numbers of the complete system of paired
functions χ0p,s,t are composed from the generators (p, s) and time variable t,
which runs numbers 0, 1, 2, 3, for the orbits in the first row in the table. For
short orbits in the second row, t runs only values of 0 and 2. Indeed, both
coordinates of points on these orbits are even; therefore conditions (n1 p+n2 s =
t mod 8) and (n1 p + n2 s = t + 4 mod 8) do not hold for odd t = 1 and 3.
In other words, for these triples (p, s, t), we have χ0p,s,t ≡ 0, and we do not
consider such functions. There is no movement (or t = 0) in single-point orbits
for (p, s) = (0, 4), (4, 4), (4, 0), and (0, 0). The set of 64 triplet-numbers for the
complete system of paired functions is given in Table 2.2.
TABLE 2.2
Set of triplets (p, s, t)
(p, s) t
(0, 1), (1, 1), (2, 1), (3, 1), (4, 1), (5, 1), (6, 1), (7, 1), (1, 0), (1, 2), (1, 4), (1, 6) 0, 1, 2, 3
(0, 2), (2, 2), (4, 2), (6, 2), (2, 0), (2, 4) 0, 2
(0, 4), (4, 4), (4, 0) 0
(0, 0) 0
Figure 2.21 shows the first 36 basis paired functions χ0p,s,t , which are placed
in the order given in the above table, starting from the top on the left to
the bottom on the right. For instance, the first four functions have numbers
(0, 1, t), where t = 0 : 3. The filled circle is used for value 1 and the open
circle for −1. It is not difficult to see that all these functions are orthogonal.
The complete set of paired functions defines the paired representation of the
image,
0 0
f → {fTp,s
0 ; T
p,s ∈ σ }. (2.34)
The components of the paired splitting-signals fTp,s0 are calculated from the
components of the splitting-signals fTp,s of the tensor representation of f by
0
fp,s,t = fp,s,t − fp,s,t+4 , t ∈ {0, 1, 2, 3}.
The transformation
0
χ0 : f → {fp,s,2 0 0
n t ; Tp,s ∈ σ , 2
n 0
= g.c.d.(p, s), t = 0 : (card(Tp,s ) − 1)} (2.35)
is called the paired transformation. Thus the paired transform is the repre-
sentation of the image in the form of 1-D splitting-signals; components of all
splitting-signals together compose the 2-D discrete paired transform.
72 CHAPTER 2: Direction Images
FIGURE 2.21
The first 36 basic functions of the complete system of the 8 × 8-paired trans-
formation. (Values of 1 are shown by the filled circles, and −1 by open circles.)
0 W, where
This splitting-signal is modified as fT3,1
W = diag{1, e−jπ/4 , e−j2π/4 , e−j3π/4} = diag{1, a(1 − j), −j, −a(1 + j)}
√
and a = 2/2 = 0.7071. The four-point DFT of the modified splitting-signal
gT3,1
0 0 W = {7, −1.4142 + j1.4142, j, 3.5355 + j3.5355}
= fT3,1
is calculated as follows:
1 1 1 1 1 0 0 0 7 9.1213 + j5.9497
1 −j −1 j 0 a(1 − j) 0 0 −2 4.8787 + j3.9497
=
−1 4.8787 − j3.9497 .
1 −1 1 −1 0 0 −j 0
1 j −1 −j 0 0 0 −a(1 + j) −5 9.1213 − j5.9497
The obtained four-point DFT coincides with the 8×8-point DFT of the image
74 CHAPTER 2: Direction Images
0
f at four frequency-points of the orbit T3,1 , i.e.
F3,1 9.1213 + j5.9497
F1,3 4.8787 + j3.9497
F7,5 = 4.8787 − j3.9497 .
One can notice from this example, that the pairs of complex conjugate com-
ponents F3,1 and F5,7 , F1,3 and F7,5 , are obtained from the same splitting-
0
signal. In general, if (p1 , p2 ) is on the orbit Tp,s , then the frequency-point
(N − p1 , N − p2 ) is also on this orbit.
Twelve subsets T 0 of the partition σ 0 of the lattice X8,8 consist of four
points each, six subsets of two points each, and the remaining four subsets are
one-point sets. The splitting of the 8 × 8-point DFT thus equals
n o
R(F8,8 ; σ 0 ) = F4 , . . . , F4 , F2 , . . . , F2 , F1 , . . . , F1 . (2.36)
| {z } | {z } | {z }
12 times 6 times 4 times
The first twelve four-point DFTs are calculated over the modified splitting-
signals
0 0 0 0
gTp,s
0 ={fp,s,0 , fp,s,1 W, fp,s,2 W 2 , fp,s,3 W 3}
0 0 0 0
(2.37)
={fp,s,0 , a(1 − j)fp,s,1 , −jfp,s,2 , −a(1 + j)fp,s,3 }
√
where a = 2/2 = 0.7071 and W = exp(−j2π/8) = a(1 − j). The generators
(p, s) of these signals lie on the first row in Table 2.2. The calculation in (2.37)
uses two operations of multiplication by the factor of a, for each splitting-
signal. The next six two-point DFTs are calculated over the short modified
splitting-signals
0 0 0 0
gTp,s
0 = {fp,s,0 , fp,s,2 W 2 } = {fp,s,0 , −jfp,s,2 }.
The generators (p, s) of these signals are given in the second row in Table 2.2.
Thus, the total number of operations of multiplication for calculating the
8 × 8-point DFT through the splitting (2.36) equals m08,8 = 12 · 2 = 24.
Example 2.4 (Case 16 × 16) The splitting of the 16 × 16-point DFT by the
partition σ 0 = (T 0 ) equals
n o
R(F16,16; σ 0 ) = F8 , . . . , F8 , F4 , . . . , F4, F2 , . . . , F2 , F1 , . . . , F1 .
| {z } | {z } | {z } | {z }
24 times 12 times 6 times 4 times
0
The cardinalities of the largest subsets Tp,s of the partition σ 0 of the lattice
X16,16 equal 8. The generators for these subsets are taken from the set J16,16,
and the corresponding modified splitting-signals have the following form:
0 0 0 2 0 3 0 7
0 W = {f
gTp,s
0 = fTp,s p,s,0 , fp,s,1 W, fp,s,2 W , fp,s,3 W , ..., fp,s,7W } (2.38)
Image Processing 75
We note for comparison, that the tensor algorithm of the 16 × 16-point DFT
uses 24m16 = 24 · 10 = 240 operations of multiplication.
When estimating this number, we use the fact that the 2n -point fast paired
DFT requires m2n = 2n−1(n − 3) + 2 multiplications, when n ≥ 3 [41, 45].
χ0 = {χ0p,s,t ; (p, s, t) ∈ U }
is complete [42]. We can construct other such sets of triples, U. For instance,
we can substitute all or a part of triplets (p, s, t) by (s, p, t).
The 2-D discrete paired transform does not require multiplications. The
complete system of paired functions is defined as
1,if np + ms = 2k t mod N,
0
χp,s,2k t (n, m) = −1, if np + ms = (2k t + N/2) mod N, (2.39)
0,otherwise,
which is the difference of two characteristic functions χp,s,2k t and χp,s,2k t+N/2 .
When (p, s) = (0, 0), the paired function is defined as χ00,0,0 (n, m) ≡ 1. The
paired function χ0p,s,2k t itself represents a 2-D plane wave, and the decompo-
sition of the image by the paired functions is the decomposition of the image
76 CHAPTER 2: Direction Images
by plane waves. All basic paired functions are orthogonal. In the masks of
paired functions, all “1”s and all “−1”s lie on the different but parallel lines,
the directions of which are defined by (p, s). Inside each series of functions
generated by frequency (p, s),
the paired functions have the same frequency, direction, and they are parallel
shifted functions with respect to each other. As an example, Figure 2.22 shows,
for the N = 32 case, the gray-scale images of basic paired functions χ01,4,1 and
χ01,4,6 in parts a and b, and functions χ02,2,6 and χ02,2,12 in c and d, respectively.
30 30 30 30
20 20 20 20
10 10 10 10
0 0 0 0
0 10 20 30 0 10 20 30 0 10 20 30 0 10 20 30
(a) (b) (c) (d)
FIGURE 2.22
Images 32 × 32 of the paired functions (a) χ01,4,1, (b) χ01,4,6 , (c) χ02,2,6 , and (d)
χ02,2,12. (Values 1, −1, and 0 correspond to the white, black, and gray levels,
respectively.)
The paired function can be considered as the quantized 2-D cosine wave
0
2π(np + ms − 2k t)
χp,s,2k t (n, m) = M cp,s,2k t (n, m) = M cos ,
2r
(2.40)
where the quantization operation, M, is defined as M [1] = 1, M [−1] = −1,
and M [x] = 0, if x 6= ±1.
For the N = 256 case, Figure 2.23 shows the gray-scale images of the 2-D
cosine wave with number (4, 8, 8) and its quantized function (or the paired
function) in parts a and b, respectively.
Similar to paired functions, inside each series of functions generated by
frequency (p, s) the cosine waves are shifted in parallel and defined by the
same direction. Figure 2.24 shows the images of the 2-D cosine waves with
numbers (1, 4, 1), (1, 8, 1), and (12, 4, 4) in parts a, b, and c, respectively. Four
periods of the wave c1,4,1 cover the discrete lattice X256,256; the wave c1,8,1
covers it with eight periods, and the wave c12,4,4 with twelve periods. Thus,
the length of each wave depends on the frequency (p, s) that generates this
Image Processing 77
50 50
100 100
150 150
200 200
250 250
50 100 150 200 250 50 100 150 200 250
(a) (b)
FIGURE 2.23
The images of (a) the 2-D cosine wave c4,8,8(n, m) and (b) the paired function
χ04,8,8(n, m).
FIGURE 2.24
The images 256 × 256 of the 2-D cosine waves (a) c1,4,1, (b) c1,8,1, and (c)
c12,4,4.
wave, and the wave is oriented in the 3-D space. It covers the period 256 × 256
in the direction that is also defined by the frequency.
In addition we observe the following property of the multiresolution of
the image, which is defined along directions. We call this property the directed
multiresolution of the image by the paired transform. The paired functions ge-
nerated by the frequencies (p, s) and (2p, 2s), as well as (4p, 4s), (8p, 8s), . . .,
are defined by the same direction. Indeed, the angles along which the co-
efficients “1” and “−1” are located in the masks equal to the angle ϑ =
arctg(p/s) = arctg(2p/2s) = arctg(4p/4s). The paired function χ02p,2s,2t can
be calculated by
and the components of the paired transform can be calculated through the
tensor transform as follows:
0 0
f2p,2s,2t = f2p,2s,2t = fp,s,t − fp,s,t+N/4 + fp,s,t+N/2 − fp,s,t+3N/4 .
As an example, Figure 2.25 shows the images of the 2-D cosine waves with
0
numbers (1, 2, 1), (2, 4, 2), (4, 8, 4), and (8, 16, 8) from J256,256 in parts a-d,
respectively. These waves have different frequencies, but they are oriented at
FIGURE 2.25
The images 256 × 256 of the 2-D cosine waves (a) c1,2,1 , (b) c2,4,2 , (c) c4,8,4,
and (d) c8,16,8.
the same angle. There are three other series of cosine waves with frequency-
numbers (16, 32), (32, 64), and (64, 128), which are defined by the direction at
this angle. Thus, seven series of the basic paired functions have the same orien-
tation, but define different resolutions. The triplet-numbers of these functions
and the number of parallel shifts of functions inside each series are given in
Table 2.3. The total number of these paired functions equals 254. In all triplet-
numbers of the above functions, the first two components are integer multiple
to (p0 , s0 ) = (1, 2) in modulo N. Therefore, we call this set of seven series of
cosine functions (and paired functions) the (1, 2)-generated set of functions.
We now consider the (1, 5)-generated set of functions. Figure 2.26 shows the
Image Processing 79
TABLE 2.3
Numbers of basic paired functions defined along the direction at angle arctg(1/2)
(p, s, t) (1, 2, t) (2, 4, 2t) (4, 8, 4t) (8, 16, 8t) (16, 32, 16t) (32, 64, 32t) (64, 128, 64t)
t 0 : 127 0 : 63 0 : 31 0 : 15 0:7 0:3 0, 1
# 128 64 32 16 8 4 2
shift by 1 2 4 8 16 32 64
FIGURE 2.26
The images 256 × 256 of the 2-D cosine waves (a) c1,5,1, (b) c2,10,2, (c) c4,20,4,
and (d) c8,40,8.
images for the 2-D cosine waves with numbers (1, 5, 1), (2, 10, 2), (4, 20, 4),
and (8, 40, 8) in parts a-d, respectively. The other two series of cosine waves
with frequency-numbers (16, 80) and (32, 160) are also defined by the same
direction. The triplet-numbers of these functions and the number of parallel
shifts of functions inside each series of the (1, 5)-generated set are given in
Table 2.4. In the general case of (p0 , s0 ) ∈ JN,N , the (p0 , s0 )-generated set of
TABLE 2.4
Numbers of basic paired functions defined along the direction at angle arctg(1/5)
(p, s, t) (1, 5, t) (2, 10, 2t) (4, 20, 4t) (8, 40, 8t) (16, 80, 16t) (32, 160, 32t) (64, 64, 64t)
t 0 : 127 0 : 63 0 : 31 0 : 15 0:7 0:3 0, 1
# 128 64 32 16 8 4 2
shift by 1 2 4 8 16 32 64
The cosine wave with number (8, 40, 8) can thus be referred to the (1, 101)-
oriented set of functions, as well as to the (1, 133)- and (1, 165)-oriented sets.
Directions of these three sets are determined by the angles arctan(1/101),
arctan(1/133), and arctan(1/165), respectively.
The function pmatrix pst.m calculates one matrix with triplet (p, s, t).
Image Processing 81
that splits the 2r -point DFT by the 2r−k−1 -point DFTs, k = 0 : (r − 1). The
components of these splitting-signals are calculated by
r
2X −1
f20 k ,2k t = χ02k ,2k t ◦ fn = χ02k ,2k t (n)fn , t = 0 : (2r−k−1 − 1).
n=0
The first four basis paired functions correspond to the frequency p = 1, the
next two functions correspond to frequency p = 2, and the last two functions
correspond to the frequencies p = 4 and 0, respectively. The process of com-
position of these functions from the corresponding cosine waves defined in the
interval [0, 7] is illustrated in Figure 2.27.
82 CHAPTER 2: Direction Images
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
1 1
0 0
−1 −1
0 2 4 6 0 2 4 6
(a) (b)
FIGURE 2.27
(a) Cosine waves and (b) discrete paired functions of the eight-point DPT.
Let fn be the signal {1, 2, 2, 4, 5, 3, 1, 3}. The paired transform of this sig-
nals results in four splitting-signals as follows:
0 0 0 0
{f , f1,1 , f1,2 , f1,3 } = {−4, −1, 1, 1},
1,0
0 0
{f2,0 , f2,2 } = {3, −2},
{fn } →
{f 0 } = {−3},
4,0
0
{f0,0 } = {21}.
Using the similar splitting for each short transform F2r−k−1 of this splitting, we
obtain the full decomposition of the 2r -point DFT, by the paired transforms.
Example 2.6 (8-point DFT) Let N = 8 and let {fn } be the signal of
Example 2.5. According to (2.42), the calculation of the eight-point DFT
of fn can be written in matrix form as
2 3 8 9 2 3 2 3
F7 2 8 9 3 1 > 1 −5.4142 + j
6 F3 7
2 3 1 >
> >
6 2 7 6 −2.5858 + j 7
6 7 6 [F2] W>
>
> > >
< > > >
5diag −j
=h 0i 7 >
> >
> 6 7 6 7
6 F5 7 64 1 χ −j 6 2 7 6 −2.5858 − j 7
> >
4
7 > >
1
> >
3
6 7 6 7 > > 6 7 6 7
6 F1 7 6 1 6 −5.4142 − j 7
7diag W
0 64 7
>
> >
> 7 < =h i
6 7=6 1
: ;
χ 8 6 7 6
6 7 =6 7
6 5 7 6 3 − 2j 7
6 F6 7 6 7 1 > 7
[F ]
>
2
6 7 6 7 > >
6 F2 7 6 −j > 6 3 7 6 3 + 2j 7
7 >
> >
> 6 7 6 7
1 5
6 7 4 >
> >
4 F4 5 1 41 5 4 −3
>
> >
> 5
1
>
> >
: >
F0 1 3 21
;
where ⊕ denotes the operation of the Kronecker sum of matrices and the
diagonal matrix
r r
D2r = diag{1, W, W 2, W 3 , ..., W 2 −1 , 1, W 2 , W 4 , ..., W 2 −2
,
r
1, W 4 , W 8 , ..., W 2 −4 , 1, ..., 1, 1}.
We start with the first series of generators, when g.c.d.(p, s) = 1. There are
3N/2 such generators that compose the subset JN,N . The inverse transform
of the above incomplete 2-D DFT can be calculated as follows:
N−1 N−1
1 X X
dn,m = Dp ,s W −(np1+ms1 )
N 2 p =0 s =0 1 1
1 1
1 X
= 2 Fp1 ,s1 W −(np1 +ms1 )
N
(p1 ,s1 )∈Tp,s
0
N/2−1
1 X
= F(2k+1)p,(2k+1)sW −(n(2k+1)p+m(2k+1)s)
N2
k=0
N/2−1
1 X
= F(2k+1)p,(2k+1)sW −(2k+1)(np+ms) (2.46)
N2
k=0
N/2−1
1 2 X −kt
= F(2k+1)p,(2k+1)sWN/2 W −t
2N N
k=0
1 0
1 0
= fp,s,t W t W −t = f ,
2N 2N p,s,(np+ms) mod N
where we denote t = (np + ms) mod N.
Thus we obtain the following direction image of the 1st series:
1 0
dn,m = d(p,s)
n,m = f , n, m = 0 : (N − 1).
2N p,s,(np+ms) mod N
The direction image N × N is composed of N/2 values of the splitting-signal
0 , which are placed on the image along the set of parallel lines np + ms =
fTp,s
t mod N, t = 0 : (N − 1). As an example, Figure 2.28 shows for the bridge
image 256 × 256 the first nine direction images defined by frequencies (p, s) =
(0, 1), (1, 1), . . . , (8, 1) in parts a-i, respectively.
According to the definition of the paired representation, the following pro-
0 0
perty holds for its components: fp,s,t+N/2 = −fp,s,t when t = 0 : (N/2 − 1).
0
When (np + ms) mod N ≥ N/2, the values of fp,s,t are placed on the image
with the minus sign. The composition of the direction image from the splitting-
signal is simple. All values of this image can be calculated, for instance, by
the following method of permutation of values of the splitting-signal. Let us
assume that a value of the direction image at point (n, m) has been calculated.
Then the next three neighbor values of the image can be calculated as follows:
0
fp,s,t+p ; if t + p < N/2,
dn+1,m =
−f 0 ; otherwise,
p,s,t+p
0
0 f p,s,t+s if t + s < N/2,
;
dn,m = fp,s,t → dn,m+1 = 0 (2.47)
−fp,s,t+s ; otherwise,
0
fp,s,t+p+s ; if t + p + s < N/2,
dn+1,m+1 = 0
−fp,s,t+p+s ; otherwise,
Image Processing 85
FIGURE 2.28
Nine first direction image components of the bridge image. (All images have
been scaled.)
where we omitted the factor 1/(2N ). Thus, the direction image can be con-
structed right after the corresponding projection data at the angle arctg(p/s)
have been obtained.
We now consider the (k + 1)th series of generators, i.e., such that
g.c.d.(p, s) = 2k , when k ∈ {1, 2, ..., r − 1}. The number of such generators in
0
the set JN,N equals 3N/2k+1 . The calculation of the inverse transform of the
86 CHAPTER 2: Direction Images
incomplete 2-D DFT, Dp1 ,s1 , results in the following direction image:
N−1 N−1
1 X X
dn,m = d(p,s)
n,m = Dp ,s W −(np1 +ms1 )
N 2 p =0 s =0 1 1
1 1
N/2k+1 −1
1 X
= F(2l+1)p,(2l+1)s W −(2l+1)(np+ms)
N2
l=0
k+1
k+1 N/2X −1
1 2 −lt W −t k
= k+1 F(2l+1)p,(2l+1)s WN/2 k+1 N/2
2 N N
l=0
1 0 t
−t
= k+1 fp,s,2k t WN/2 k WN/2 k
2 N
1 0
= k+1 fp,s,(np+ms) mod N , (2.48)
2 N
where we denoted 2k t = (np + ms) mod N.
For the bridge image, Figure 2.29 shows the first nine direction images of
the 2nd series, for the generators (p, s) = (0, 2), (2, 2), . . . , (16, 2) in parts a-i,
respectively.
The last series of generators contains only the frequency (0, 0) and the set
0
T0,0 = {(0, 0)}. The transform Dp1 ,s1 is zero at all frequency-points except
the point (0, 0), where the transform equals F0,0 . In this case, we have the
following constant-image:
1 1 0
dn,m = d(0,0)
n,m = 2
F0,0 = 2 f0,0,0 .
N N
0 0
All (3N − 2) subsets Tp,s , with generators (p, s) ∈ JN,N , compose a par-
tition of the lattice N × N. It means the sum of corresponding (3N − 2)
incomplete 2-D DFTs equals the 2-D DFT of the image. It also means the
(p,s)
sum of (3N − 2) direction images dn,m equals the image fn,m .
Statement 2: (Superposition by paired direction images) The disc-
rete image of size N × N, where N = 2r , (r > 1), can be composed from
(3N − 2) direction images by
X
fn,m = d(p,s)
n,m
(p,s)∈JN,N
0
r−1
1 X 1 X
0 1 0 (2.49)
= fp,s,(np+ms) mod N + f ,
2N 2k N 2 0,0,0
k=0 (p,s)∈J2r−k ,2r−k
n, m = 0 : (N − 1).
This is the formula of composition of the image by direction images and the
formula of reconstruction of the image from its 2-D discrete paired transform.
Image Processing 87
FIGURE 2.29
Nine direction image components of the bridge image. (All images have been
scaled.)
This theorem can be proved from the following statement [43, 46]:
Theorem 2.2 Let L > 1 be a prime number and let r > 1. Then, the follo-
wing is valid:
1) For each sample (p, s) of X and m = 0 : (Lr−n−1 − 1),
Lr−n−1
X −1
0 t
mt
F(mL+1)p,(mL+1)s = fp,s,L n t WLr−n WLr−n−1 . (2.55)
t=0
0
The 2-D DFT at frequency-points of the subset Tp,s is defined by the N/Ln+1 -
point DFT of the splitting-signal modified by twiddle coefficients. Here Ln is
defined as g.c.d.(p, s) = jLn , where j ∈ {1, ..., L − 1}.
2) The Lr × Lr -point DFT is split into (L2 − 1)Lr−1 Lr−1 -point DFTs,
(L − 1)Lr−2 Lr−2 -point DFTs, . . . , and (L2 − 1)L L-point DFTs.
2
It should be noted that the sum on the right side of Equation (2.55) de-
scribes the shifted 1-D DFT of the splitting-signal. For instance, when n = 0,
we have
Lr−1
X−1 Lr−1
X−1
0 (m+ 1 )t 0
Fm+ L1 = fp,s,t WLr−1 L = fp,s,t WLt r WLmt
r−1
t=0 t=0
m = 0 : (Lr−1 − 1),
which is the shifted Lr−1 -point DFT in the frequency domain, (m → m+1/L).
The 2-D paired transform, or the L-paired transform is the representation
of the 2-D image in the 2-D frequency and 1-D time domain in the form of a
family of paired splitting-signals,
[ L−1
r−1 [ [ n o
0 n+1
{fn,m } → fp,s,L n t ; t = 0 : (N/L − 1)
n=0 j=1 (p,s)∈jLn JN/Ln ,N/Ln
[
{f0,0,0},
j=1 j=2
n
u 150
m
b j=1 j=2
e 100
r
50
81 27 9 31
signal length
(a) {fn,m } 0
(b) {fp,s,t }
FIGURE 2.30
(a) Bridge image 243 × 243 and (b) the splitting-signals of lengths
81, 27, 9, 3, 1, 1.
j=1 j=2
D 250
F
T
200
n
u
m 150
b
e j=1 j=2
r 100
50
81 27 9 31
1−D DFT order
FIGURE 2.31
1-D DFTs of the modified splitting-signals. (All transforms are in absolute
scale and shifted to the center).
[ L−1
r−1 [
0
JN,N = {jLk JLr−k ,Lr−k } ∪ {(0, 0)},
k=0 j=1
Lr−n−1
X −1
F(mL+1)p,(mL+1)s = Gm = gt0 WLmt
r−n−1 , (2.59)
t=0
where we define
0
gt0 = gp,s,t 0
= fp,s,L t
n t WLr−n , t = 0 : Lr−n−1 − 1.
incomplete 2-D DFT is composed only from the components of the 2-D DFT
0
with frequency-points of the subset Tp,s ,
0
Fp1 ,s1 ; if (p1 , s1 ) ∈ Tp,s;L
Dp1 ,s1 = (2.61)
0; otherwise.
The image of this incomplete 2-D transform is composed only of values of the
splitting-signal generated by (p, s).
We first consider this image for a generator (p, s) from the first series of
0
generators in JN,N , i.e., when g.c.d.(p, s) ∈ {1, 2, ..., L − 1}. The following
calculations hold for the inverse 2-D DFT:
N−1 N−1
1 X X
d(p,s)
n,m = Dp ,s W −(np1+ms1 )
N 2 p =0 s =0 1 1
1 1
1 X
= 2 Fp1 ,s1 W −(np1+ms1 )
N
(p1 ,s1 )∈Tp,s
0
N/L−1
1 X
= F(kL+1)p,(kL+1)s W −(n(kL+1)p+m(kL+1)s)
N2
k=0
N/L−1
1 X
= F(Lk+1)p,(Lk+1)s W −(Lk+1)(np+ms)
N2
k=0
N/L−1
1 L X −kt
= F(Lk+1)p,(kL+1)sWN/L W −t
LN N
k=0
N/L2 −1
1 X −(kL+1)(np/L+ms/L)
d(p,s)
n,m = F(kL+1)p,(kL+1)s WN/L
N2
k=0
N/L2 −1
1 L2 X −k(np/L+ms/L) −(np/L+ms/L)
= F(kL+1)p,(kL+1)s WN/L2 WN/L
N L2 N
k=0
(p,s) 1
dn,m = f0 k W
−t+t̃
k
N Lk+1 p,s,L t̃ N/L
L−1
1 X
−t+t̃
= k+1
fp,s,Lk t̃+nN/L WLn WN/L k
NL n=0
L−1 (2.66)
1 X t−t̃
n− r−k−1
= fp,s,L k t̃+nN/L WL
L
N Lk+1 n=0
L−1 2π
1 X 1
= cos n − (t − t̃) fp,s,Lk t̃+nN/L
N Lk+1 n=0 L Lr−k−1
Each component of the paired transform can be calculated from the pro-
jection data. To reconstruct the discrete image on the Cartesian lattice, only
(L + 1)N/L projections are needed at the angles of the set
Problems
Problem 2.1 On the lattice 16 × 16, sketch the parallel lines, or rays that
pass through the points of the sets {V1,4,t ; t = 0 : 3}. Determine and sketch
parallel lines that pass through the points of the group T1,4 .
Problem 2.2 Consider the lattice 7 × 7 and the frequency-point (1, 3). Show
that the set of parallel rays that pass all points of the sets V1,3,t , t = 0 : 6, is
not unique. Determine at least two different sets of such parallel rays and for
each of these sets, determine the total number of rays.
Problem 2.3 Calculate all basic functions of the 2-D tensor transformation
for the N = 11 case and pack them into the matrix 121 × 121. Calculate also
the matrix of the inverse tensor transformation. Use MATLAB
R
function
imagesc to sketch these matrices as images.
Problem 2.4 For the tree image 256 × 256, calculate the direction images
(1,3) (1,16)
dn,m and dn,m from the corresponding splitting-signals generated by fre-
quencies (p, s) = (1, 3) and (1, 16), respectively.
Image Processing 95
1 1 0 1 0 1 1
0 1 1 0 1 1 0
0 1 2 1 2 1 0
[fn,m ; n, m = 0 : 6] = 1 0 1 6 1 0 1 .
0 1 2 1 2 1 0
0 1 1 0 1 1 0
1 1 0 1 0 1 1
Calculate and sketch eight direction components of this image in tensor repre-
sentation. Calculate the original image from the sum of these eight direction
images.
Problem 2.6 Accomplish the subsampling of the tree image down to the size
32 × 32 and consider this image in paired representation.
A. Splitting-signals of the image have different energies. Determine and
sketch the five paired splitting-signals of the subsampled image that have the
highest energies.
B. Sketch the direction images defined by the splitting-signals in A. The
values of the direction image across all parallel rays are periodically repeated.
Determine these periods for each of the above five direction images.
C. The number of splitting-signals for the subsampled image 32 × 32 is 94,
and they gave different lengths. It is possible to pack all splitting-signals into
a matrix 32 × 32. Develop an algorithm to pack all splitting-signals in such
matrix.
Problem 2.7 The 2-D paired transformation χ0N,N is not separable. Prove
that the 2-D basic paired functions can be obtained from the basic functions
of the 1-D paired transformation.
Problem 2.8 Suppose that you are given an image of size 256 × 256. De-
velop an algorithm for calculating the 2-D separable paired transform of this
image. Compare your result with the 2-D non-separable paired transform of
the image.
Problem 2.9 Assume that the image you are given has the size 243×243. The
number 243 is the power of three, 243 = 35 . Develop a fast algorithm of the
3-paired transform of this image. You may calculate first the tensor transform
of this image, and then use it to calculate all 3-paired splitting-signals. Sketch
the image and the magnitude of the 3-paired transform.
Problem 2.10 The given image 512 × 512 can be extended to the size 513 ×
513. Discuss the effect of using the image 513 × 513 in the frequency domain,
instead of the original image.
This page intentionally left blank
3
Image Sampling Along Directions
FIGURE 3.1
Method of computed X-ray tomography.
97
98 CHAPTER 3: Image Reconstruction
We assume that the original image f(x, y) occupies the square region [0, 1] ×
[0, 1], which is divided into N 2 image elements by the Cartesian lattice N ×N,
where N > 1; therefore ∆x = ∆y = 1/N. All image elements are numbered
by (n, m), where n, m = 0 : (N − 1), and the image is considered in matrix
form fn,m with values
Z
fn,m = f(x, y)dxdy = (∆x)2 fd (x0 , y0 ), ∀(x0 , y0 ) ∈ (n,m)-th IE,
(n,m)-th IE
(3.2)
which are placed in the center of the corresponding (n, m)-th IE (see Fi-
gure 3.2). Thus, the point (x0 , y0 ) is considered to be the center of the (n, m)-th
IE. Thus the discrete image is considered on the square grid, or the Cartesian
lattice XN,N = {(n, m); n, m = 0 : (N − 1)} inside the region [0, 1] × [0, 1]. In
such a model, the ray-sum, or line-integral along the ray l in the (n, m)-th IE
Image Processing 99
1
f(x,y)
l−ray
0.67
∆l
f(n,m)
y m
0.33 IE
n
0
0 0.33 0.67 1
x
FIGURE 3.2
Model of the discrete image.
is defined as follows:
Z
(n,m) 1
wl = f(x, y)dl = (∆l)fd (x0 , y0 ) = (∆l) fn,m = (∆l)N 2 fn,m
(n,m)-th IE (∆x)2
where ∆l = ∆ln,m is the length of the ray l in the (n, m)-th IE. Therefore, if
∆l 6= 0, i.e., the ray passes through the IE, then
1 (n,m)
fn,m = wl , n, m = 0 : (N − 1). (3.3)
N 2 ∆l n,m
If the number of projections is L, and {l} is the set of rays passing through
the (n, m)-th IE, then we can write the following:
1 1 X 1 (n,m)
fn,m = 2 w , n, m = 0 : (N − 1). (3.6)
N L ∆l n,m l
l∈{l}
(n,m)
Here, we can probably approximate each normalized integral wl /∆ln,m
by the full integral of the image along the ray that passes through the point
(n, m), after normalizing this integral by the length of the ray. As a result, we
obtain an approximation
1 1 X wl
fn,m ≈ , n, m = 0 : (N − 1), (3.7)
N2 L ∆l
l∈{l}
where ∆l are the lengths of the rays inside the square region [0, 1] × [0, 1].
This approximation, which can be referred to as backprojection [29, 30], will
be considered in detail in Chapter 7. Now we discuss a method of exact re-
construction of the image.
on the square grid XN,N . These lines are referred to as the arithmetical rays.
The equation of these lines on the square [0, 1] × [0, 1] is
t p+s
l(t) = lp,s (t) = (x, y); px + sy = + , t = 0 : (p + s)(N − 1).
N 2N
These lines are referred to as the geometrical rays, to distinguish the discrete
and continuous cases. These two types of rays are denoted by l(t), and the
same set of t is considered for the rays, t = 0 : (p + s)(N − 1). This set of t
for the geometrical rays may be changed for effective calculation of sums vl
for different (p, s), as will be shown later.
Image Processing 101
l1,1(2)
0
0
0.25
1
y and m 0.5
2
0.75
3
1
0 1 2 3
0 0.25 0.5 0.75 1
x and n
FIGURE 3.3
Two coordinate systems for images f(x, y) and f(n, m).
The generator (p, s) defines the slope, − tan−1 (p/s), of these rays. The
sums of the image along the arithmetical rays are denoted by
X
vp,s (t) = vl(t) = fn,m .
lp,s,t
be solved by using the inverse 2-D DPT. We here recall briefly the main
results of the paired representation of the image, which defines a unique image
superposition by direction images.
The discrete image {fn,m } of size N × N, where N = 2r , r > 1, can be
composed of (3N − 2) splitting-signals as
r−1
1 X 1 X
0 1 0
fn,m = fp,s,(np+ms) mod N + f . (3.8)
2N 2k N 2 0,0,0
k=0 (p,s)∈2k J2r−k ,2r−k
where 2k = g.c.d.(p, s), are calculated by the system of orthogonal 2-D paired
functions χ0p,s,2k t (n, m) defined in (2.39). The set of N 2 triplet-numbers of
paired functions is defined as
r−1
[n o
UN,N = (p, s, 2k t); (p, s) ∈ 2k JN/2k ,N/2k , t = 0 : (N/2k+1 −1) ∪{(0, 0, 0)},
k=0
(3.9)
where the subsets of generators (p, s) are calculated by
JN/2k ,N/2k = (1, s); s = 0 : (N/2k − 1) ∪ (2p, 1); p = 0 : (N/2k+1 − 1) .
0 1 0 1
fp,s,t → fp,s,t = f0 , 0
(f0,0,0 0
→ f0,0,0 /N ),
2 k+1 2 · g.c.d(p, s) p,s,t
Due to this formula, the value of the discrete image at each point (n, m)
is defined by 3N − 2 values of the 2-D DPT, which are calculated along
arithmetical rays of 3N/2 projections that pass through points (n, m) on the
Cartesian grid on the image. The number of operations of addition which are
required to reconstruct the image by this equation equals
as shown in Figure 3.4. Note that along the horizontal axis, the integer value
y and m
0.5 0.5
2 2
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.4
Schemes of calculating four line-integrals for (p, s) = (1, 0).
n runs from 0 to 3, and x runs the interval [0, 1]. Along the vertical axis, the
104 CHAPTER 3: Image Reconstruction
integer value m runs from 0 to 3, and y runs the interval [0, 1]. The same
system of coordinates is used for all masks of basic functions of the paired
transform.
We denote the sums of the discrete image along these lines by v1,0 (t),
X 3
X
v1,0 (t) = vl(t) = fn,m = ft,m , t = 0, 1, 2, 3.
l1,0 (t) m=0
They are four measurements of the projection by the angle ϕ = ϕ1,0 = 0 to the
horizontal axis. This horizontal projection defines the first two components of
the 2-D paired transform of the image,
0 0
f1,0,0 = v1,0 (0) − v1,0 (2), f1,0,1 = v1,0 (1) − v1,0 (3).
All sums v1,0 (t) can be calculated from the horizontal projection of the image
f(x, y), Z
w1,0 (t) = wl(t) = f(x, y)dl, t = 0, 1, 2, 3.
l(t)
The length of intersection of the geometrical ray l(t) with the (t, m)-th IE
equals ∆l = ∆lt,m = 1/N, and
N−1
1 X (t,m) 1 1 1
v1,0 (t) = w = 2 1 wl(t) = wl(t) = w1,0(t). (3.12)
N 2 ∆l m=0 l N N N N
Therefore
0 1
f1,0,t [w1,0 (t) − w1,0(t + 2)], t = 0, 1.
=
N
The next two paired functions generated by (p, s) = (0, 1) have the follo-
wing masks:
1 1 1 1 0 0 0 0
0 0 0 0 1 1 1 1
[χ00,1,0] =
−1 −1 −1 −1 ,
[χ00,1,1] =
0 0 0 0 .
(3.13)
0 0 0 0 −1 −1 −1 −1
X 3
X
v0,1 (t) = fn,m = fn,t , t = 0 : 3.
l0,1 (t) n=0
Image Processing 105
0 0
0 l(0) 0
0.25 0.25
1 1 l(1)
y and m
y and m
0.5 0.5
2 l(2) 2
0.75 0.75
3 3 l(3)
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.5
Schemes of calculating four line-integrals for (p, s) = (0, 1).
This vertical projection defines two components of the 2-D paired transform,
0 0
f0,1,0 = v0,1 (0) − v0,1 (2), f0,1,1 = v0,1 (1) − v0,1 (3).
All sums v1,0 (t) can be calculated from the vertical projection of the image
f(x, y), Z
w0,1 (t) = wl(t) = f(x, y)dl, t = 01, 2, 3,
l(t)
and, therefore,
0 1
f1,0,t = [w1,0 (t) − w1,0(t + 2)], t = 0, 1.
N
The next three basic functions have the following masks:
1 1 1 1 1 −1 1−1 1 1 1 1
−1 −1 −1 −1 1 −1 1−1
1
1 1 1
[χ00,2,0] = 0 0
1 1 1 1 , [χ2,0,0] = 1 −1 1−1 , [χ0,0,0] = 1
,
1 1 1
−1 −1 −1 −1 1 −1 1−1 1 1 1 1
and they are defined by the vertical and horizontal projections. The corres-
106 CHAPTER 3: Image Reconstruction
and
0
f1,0,0 1 0 −1 0 w1,0 (0)
0
0 = 1 0 1 0 −1 w1,0 (1) ,
f1,0,1
f2,0,0 4 1 −1 1 −1 w1,0 (2)
0 1 1 1 1 w1,0 (3)
f0,0,0
where
1 0 −1 0
0 1 0 −1
[χ04,4] =
1 −1 1 −1
1 1 1 1
is the matrix of the 4-point 1-D paired transformation, χ04 . The calculation of
0
the component f0,0,0 is repeated and, therefore, can be omitted from one of
these equations, or considered as the mean of calculations by both projections,
0 1h1
f0,0,0 = [w0,1(0) + w0,1 (1) + w0,1(2) + w0,1 (3)]+
2 4 i
1
+ [w1,0(0) + w1,0(1) + w1,0 (2) + w1,0 (3)] .
4
Image Processing 107
0 1 0 −1 −1 0 1 0
Figure 3.6 shows two masks of the paired functions for the frequency-
point (p, s) = (1, 1) and seven parallel rays along which the coefficients ±1
are located. These rays define the diagonal projection of the image when the
y and m
0.5 0.5
2 l(6) 2
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.6
Schemes of calculating seven line-integrals for (p, s) = (1, 1).
angle of projection equals π/4. The sums of the image along the arithmetical
rays
l(t) = l1,1,t = {(x, y); 1x + 1y = t/4 + 1/4}, t = 0, 1, ..., 6,
define the following components of the 2-D paired transform:
0
f1,1,0 = v1,1 (0) − v1,1 (2) + v1,1 (4) − v1,1 (6),
0
f1,1,1 = v1,1 (1) − v1,1 (3) + v1,1 (5).
√
In this case, ∆l = ∆l1,1 = 2∆x and the sums v1,1 (t) are defined by the
line-integrals w1,1 (t) as
0 1
f1,1,0 = √ [w1,1(0) − w1,1 (2) + w1,1(4) − w1,1 (6)],
4 2
0 1
f1,1,1 = √ [w1,1(1) − w1,1 (3) + w1,1(5)].
4 2
The mask of the paired function χ02,2,0 contains only coefficients ±1,
1 −1 1 −1
−1 1 −1 1
[χ02,2,0] =
1 −1 1 −1 ,
−1 1 −1 1
which can be seen on the seven parallel lines 1x + 1y = t/4 + 1/4, t = 0 : 6,
y and m
l(−2)
0.5 0.5
2 l(6) 2
l(−3)
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.7
Two schemes of calculating seven line-integrals for (p, s) = (2, 2).
0
which are shown in Figure 3.7 (on the left). Therefore the component f2,2,0
of the paired transform can be calculated by
6 6
0
X 1 X
f2,2,0 = (−1)n v1,1 (t) = √ (−1)n w1,1 (t).
t=0
4 2 t=0
or
0
f1,1,0 1 0 −1 0 w1,1 (0) + w1,1 (4)
0
f1,1,1 1
= √ 0 1 0 −1 w1,1 (1) + w1,1 (5)
4 2 1 −1 1 −1 w1,1 (2) + w1,1 (6) .
0
f2,2,0
√
0 1 1 1 1 w1,1 (3)
f0,0,0 / 2
The matrix 4 × 4 in this equation is the matrix of the four-point DPT.
0 −1 0 1 1 0 −1 0
where t runs the integer numbers from 0 to 12. The rays compose the angle
ϕ1,3 = π −tan−1 (1/3) to the horizontal axis, as shown in the following matrix:
0 1 2 3
3 4 5 6
[1 · n + 3 · m = t] =
6 7 8 9 .
(3.16)
9 10 11 12
The line connecting two 6’s shows the ray l(6) and the direction of the parallel
rays in the projection. This large number of rays can be replaced with another
set of parallel rays with number less than 13. To show that, we first consider
the location of four coefficients −1 in the mask of the function χ01,3,0(n, m). The
locations of these units are determined by the above matrix, where coefficients
t = 2, 6, and 10 equal 2 mod 4. These four −1 are located on three parallel
rays by the angle ϕ1,3 to the horizontal. One ray passes through two points
with number 6, and one ray passes through the points with numbers 2 and
10 each. Similarly, one can notice that four coefficients 1 in the mask [χ01,3,0],
which are shown by coefficients t = 0, 4, 8, and 12 which equal 0 mod 4, are
110 CHAPTER 3: Image Reconstruction
on the different four parallel rays by the angle ϕ1,3 to the horizontal. Thus,
all units of this mask are situated on seven rays.
Consider the similar matrix [t] which is determined by the point (1, 3−4) =
(1, −1),
0 1 2 3
−1 0 1 2
[1 · n − 1 · m = t] =
−2 −1 0 1 .
−3 −2 −1 0
One can see that coefficients ±2 are located on two parallel rays, and all
coefficients 0 are on one diagonal ray. These rays compose the angle ϕ1,−1 =
tan−1 (1) = π/4 with the horizontal axis,
and the total number of them equals (1+|−1|)3+1 = 7, as shown in Figure 3.7
(on the right).
The sums of the image along these arithmetical rays l(t) define the follo-
wing components of the 2-D paired transform:
0
f1,3,0 = −v1,−1 (−2) + v1,−1 (0) − v1,−1 (2),
0
f1,3,1 = v1,−1 (−3) − v1,−1 (−1) + v1,−1 (1) − v1,−1 (3),
y and m
l(−2)
0.5 0.5
2 2
l(−3)
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.8
Schemes of calculating seven line-integrals for (p, s) = (1, −1).
Similar to the (p, s) = (1, 1) case, the sums v1,−1 (t) of the image are defined
by the line-integrals w1,−1 (t) as follows:
0 1
f1,3,0 = √ [−w1,−1(−2) + w1,−1 (0) − w1,−1 (2)],
4 2
0 1
f1,3,1 = √ [w1,−1(−3) − w1,−1 (−1) + w1,−1 (1) − w1,−1 (3)].
4 2
As follows from Figure 3.7 (on the right), one can also calculate the component
0
f2,2,0 , by using these line-integrals,
3 3
0
X 1 X
f2,2,0 = (−1)n v1,−1 (t) = √ (−1)n w1,−1 (t).
t=−3
4 2 t=−3
w1,−1(3)
The coefficients ±1 on these masks are situated on the parallel rays at the
angle ϕ1,2 = π − tan−1 (1/2) with the horizontal axis (see Figure 3.9),
where t runs the integer numbers from 0 to 9. The sums of the image along
112 CHAPTER 3: Image Reconstruction
y and m
0.5 0.5 l(7)
2 l(8) 2
0.75 0.75 l(9)
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.9
Schemes of calculating seven line-integrals for (p, s) = (1, 2).
One can see from Figure 3.9 and Figure 3.10 (on the left), that the geo-
metrical rays l(t) pass through the additional squares, or image elements on
which the arithmetical rays are not defined. For example, the arithmetical ray
l(6) passes through only two image elements with numbers (0, 3) and (2, 2),
and the geometrical ray l(6) passes through six image elements with numbers
(0, 3), (1, 3), (1, 2), (2, 2), (3, 2), and (3, 1). Each sum v1,2 (t) cannot be calcu-
lated from only the integral w1,2 (t), which is defined along the geometrical
rays l(t), as was the case for the (p, s) = (1, 1) and (1, 3) cases. To derive a
simple expression between the measurements along the arithmetical and geo-
metrical rays for this projection, we first consider the arithmetical rays l(6)
and l(7) and the geometrical ray l = {(x, y); x +2y = 2} between them, which
can be considered as the ray ˜l(7) = l(7 − 0.5) shifted in the vertical direction.
This
√ geometrical √ ray intersects four image elements with intersection of length
5/2∆x = 5/8 in each. Therefore, the line-integral along this ray can be
expressed by two sums of the image along the neighbor rays, but arithmetical,
as follows:
√
5 1
w = w1,2 (7) = w(˜ l(7)) = 2
[f0,3 + f1,3 + f2,2 + f3,2 ]
√ (∆x)
8
5 1
= 2
[(f0,3 + f2,2 ) + (f1,3 + f3,2 )]
√ (∆x)
8
5 v1,2 (6) + v1,2 (7) √
= 2
= 2 5 [v1,2 (6) + v1,2 (7)] .
8 (∆x)
Image Processing 113
y and m
l(7)
0.5 0.5 l(8)
l(7)
2 2 l(9)
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.10
Schemes of calculating seven line-integrals for (p, s) = (1, 2).
which are shown in Figure 3.10 (on the right) and numbered from left to right
and top to bottom (and without the fraction 1/2 in the numbers). In the
figure, rays l̃(t) are denoted by l(t). For all line-integrals of the image along
these rays, we can write the following:
√
w1,2(t) = 2 5 [v1,2 (t − 1) + v1,2 (t)] , t = 0 : 9, (3.18)
The above Toeplitz matrix 10 × 10 with a left bandwidth of 1 has the triangle
inverse matrix, and all sums along the arithmetical rays are calculated by
v1,2 (0) 1 0 0 0 0 0 0 0 0 0 w1,2 (0)
v1,2 (1) −1 1 0 0 0 0 0 0 0 0 w1,2 (1)
v1,2 (2) 1 −1 1 0 0 0 0 0 0 0 w1,2 (2)
v1,2 (3) −1 1 −1 1 0 0 0 0 0 0 w1,2 (3)
v1,2 (4) 1
= √ 1 −1 1 −1 1 0 0 0 0 0 w1,2 (4) .
v1,2 (5) 2 5 −1 1 −1 1 −1 1 0 0 0 0 w1,2 (5) (3.20)
v1,2 (6) 1 −1 1 0 1 −1 1 0 0 0 w1,2 (6)
v1,2 (7) −1 1 −1 1 −1 1 −1 1 0 0 w1,2 (7)
v1,2 (8) 1 −1 1 −1 1 −1 1−1 1 0 w1,2 (8)
v1,2 (9) −1 1 −1 1 −1 1 −1 1 −1 1 w1,2 (9)
This equation can also be written in the following simple recurrent form:
v1,2 (t)= (−1)t [w1,2(0) − w1,2 (1) + w1,2 (2) − ... + (−1)t w1,2 (t)]
= w1,2 (t) − v1,2 (t − 1), (v1,2 (−1) = 0) (3.21)
t = 0, 1, 2, . . ., 9,
√
where the factor of 1/2 5 is omitted for simplicity.
Case 2: We now consider another set of geometrical rays,
˜
l(t) = l1,2 (t + 0.5) = {(x, y); 1 · x + 2 · y = t/4 + 1/2},
which are defined by shifting the arithmetical rays to the left, as shown in
Figure 3.11. The geometrical ray l = {(x, y); x + 2y = 2} between the arith-
y and m
l(6)
0.5 0.5 l(7)
l(7)
2 2 l(8)
0.75 0.75 l(9)
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.11
The 2nd set of rays for calculating seven line-integrals for (p, s) = (1, 2).
metical rays l(6) and l(7) is considered as the shifted ray ˜l(6) = l(6 + 0.5).
The line-integral along this ray can be expressed by two sums of the image
along these arithmetical rays, as follows:
√
w = w1,2(6) = w(˜l(6)) = 2 5 [v1,2 (6) + v1,2 (7)] .
Image Processing 115
For all line-integrals of the image along the rays ˜l(t), we can write the following:
√
w1,2(t) = 2 5 [v1,2 (t) + v1,2 (t + 1)] , t = 0 : 9, (3.22)
The Toeplitz matrix 10×10 with a right bandwidth of 1 has the upper triangle
inverse matrix, and all sums along the arithmetical rays are calculated by
v1,2 (0) 1 −1 1−1 1 −1 1 −1 1 −1 w1,2 (0)
v1,2 (1) 0 1 −1 1 −1 1 −1 1 −1 1 w1,2 (1)
v1,2 (2) 0 0 1−1 1 −1 1 −1 1 −1 w1,2 (2)
v1,2 (3) 0 0 0 1 −1 1 −1 1 −1 1 w1,2 (3)
v1,2 (4) 1
= √ 0 0 0 0 1 −1 1 −1 1 −1 w1,2 (4) .
v1,2 (5) 2 5 0 0 0 0 0 1 −1 1 −1 1 w1,2 (5) (3.24)
v1,2 (6) 0 0 0 0 0 0 1 −1 1 −1 w1,2 (6)
v1,2 (7) 0 0 0 0 0 0 0 1 −1 1 w1,2 (7)
v1,2 (8) 0 0 0 0 0 0 0 0 1 −1 w1,2 (8)
v1,2 (9) 0 0 0 0 0 0 0 0 0 1 w1,2 (9)
0 0 0 0 −1 1 −1 1
116 CHAPTER 3: Image Reconstruction
y and m
0.5 0.5
2 2
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.12
Schemes of calculating 11 line-integrals for (p, s) = (2, 1).
Case 1: As in the (p, s) = (1, 2) case, the geometrical rays l(t) pass
through some image elements which are not intersected by arithmetical rays
of this projection. Therefore we consider a new set of shifted geometrical rays
˜
l(t) = l2,1 (t − 0.5) = {(x, y); 2 · x + 1 · y = t/4 + 1/4}.
The example with arithmetical rays l(4) and l(5) given in Figure 3.13 (on
the left) shows that the geometrical√ray between them intersects four image
elements with intersection of length 5/8 in each. Therefore, the line-integral
along this ray can be expressed by two neighbor rays, but arithmetical, as
follows:
√
5 1
w = w(5)= [(f1,3 + f2,1 ) + (f1,2 + f2,0 )]
8 (∆x)2
√
5 v2,1 (5) + v1,2 (4) √
= 2
= 2 5 [v2,1 (5) + v2,1 (4)] .
8 (∆x)
Ten such shifted geometrical rays are shown in Figure 3.13 (on the right). For
all line-integrals of the image along these rays, we can write the following:
√
w2,1(t) = 2 5 [v2,1 (t) + v2,1 (t − 1)] , t = 0 : 9, (3.26)
Image Processing 117
y and m
0.5 0.5
2 2
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.13
Schemes of calculating 11 line-integrals for (p, s) = (2, 1).
where v2,1 (−1) = 0. The sums of the image along the arithmetical rays can
be calculated from ten line-integrals along the geometrical rays, by using the
following equation:
v2,1 (t) =(−1)t [w2,1(0) − w2,1 (1) + w2,1(2) − . . . + (−1)t w2,1 (t)]
=w2,1 (t) − v2,1 (t − 1), (v2,1 (−1) = 0) (3.27)
t = 0, 1, 2, . . ., 9,
√
where the factor of 1/(2 5) is omitted.
We also can define two new binary orthogonal matrices
1 −1 1 −1 1 −1 1 −1
1 −1 1 −1 −1 1 −1 1
[χ02,1,0+1] = 0
−1 1 −1 1 , [χ2,1,0−1] = −1 1 −1 1
−1 1 −1 1 1 −1 1 −1
and
3 X
X 3
0
f2,1,0−1 = χ02,1,0−1(n, m)fn,m .
m=0 n=0
These components can be calculated from the line-integrals along the geomet-
118 CHAPTER 3: Image Reconstruction
rical rays as
0
f2,1,0+1 = (v2,1,0 − v2,1,2 + v2,1,4 − v2,1,6 + v2,1,8 )
+(v2,1,1 − v2,1,3 + v2,1,5 − v2,1,7 + v2,1,9 )
= (v2,1,0 + v2,1,1 ) − (v2,1,2 + v2,1,3 ) + (v2,1,4 + v2,1,5)
−(v2,1,6 + v2,1,7 ) + (v2,1,8 + v2,1,9 )
1
= 2√ 5
(w2,1,1 − w2,1,3 + w2,1,5 − w2,1,7 + w2,1,9),
y and m
0.5 0.5
2 2 l(9)
0.75 0.75
3 3
1 1
0 1 2 3 0 1 2 3
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
x and n x and n
FIGURE 3.14
The 2nd set of rays for calculating seven line-integrals for (p, s) = (2, 1).
the arithmetical rays l(4) and l(5) is considered as the shifted ray ˜l(4) =
l(4 + 0.5). The line-integral along this ray can be expressed by two sums of
the image along these arithmetical rays, as follows:
√
w = w2,1(4) = w(˜l(4)) = 2 5 [v1,2 (4) + v1,2 (5)] .
Image Processing 119
where it is assumed that v2,1 (10) = 0. The solution of this system of equations
can be calculated by using the following recurrent procedure:
b(9)= w2,1 (9),
(3.29)
b(t)= w2,1 (t) − b(t + 1), t = 8, 7, 6, . . ., 1, 0,
√
and v2,1 (t) = b(t)/(2 5), for t = 0 : 8.
Thus for reconstruction of the image 4 × 4, six projections are used with
total 4 + 4 + 7 + 7 + 10 + 10 = 42 measurements along the geometrical rays,
as shown in Table 3.1.
TABLE 3.1
Data of the 4 × 4 discrete image reconstruction
Projection Number (p, s, t) of basic paired functions # measurements
0◦ (1, 0, 0), (1, 0, 1), (2, 0, 0), (0, 0, 0) 4
90◦ (0, 1, 0), (0, 1, 1), (0, 2, 0) 4
45◦ (1, 1, 0), (1, 1, 1), (2, 2, 0) 7
−45 (135◦ )
◦
(1, 3, 0), (1, 3, 1) 7
63.43◦ (1, 2, 0), (1, 2, 1) 10
26.57◦ (2, 1, 0), (2, 1, 1) 10
All equations of the A-rays l(t), G-rays ˜l(t) = l(t − t0 ) with shifts t0 ,
and the sums vp,s (t) considered above for the example N = 4, are given in
Table 3.2. In the last column, the normalized factors are given for the sums
vp,s (t), so that vp,s (t) = vp,s (t)/K. For generators (p, s) = (1, 2) and (2, 1),
both cases of G-rays l̃(t) are given, when the corresponding set of A-rays are
shifted to the left and right.
TABLE 3.2
Equations of G-rays for the image 4 × 4
(p, s) A-rays t0 G-rays l(t − t0 ) t vp,s = A−1 wp,s K
(1, 0) l1,0 (t) 0 x = 4t + 81 0:3 w1,0 (t) 4
√
(1, 1) l1,1 (t) 0 x + y = 4t + 41 0:6 w1,1 (t) 4√2
(1, 2) l1,2 (t) 1/2 x + 2y = 4t + 81 0:9 w1,2 (t) − v1,2 (t − 1) 2√5
l1,2 (t) −1/2 x + 2y = 4t + 21 9:0 w1,2 (t) − v1,2 (t + 1) 2√5
(1, 3) l1,−1 (t) 0 x − y = 4t 3 : −3 w1,−1 (t) 4 2
(0, 1) l0,1 (t) 0 y = 4t + 81 0:7 w0,1 (t) 4
√
(2, 1) l2,1 (t) 1/2 2x + y = 4t + 41 0:9 w2,1 (t) − v2,1 (t − 1) 2√5
l2,1 (t) −1/2 2x + y = 4t + 2t 9:0 w2,1 (t) − v2,1 (t + 1) 2 5
where subscripts are considered modulo N. The paired function χ02p,2s,2t can
thus be calculated by
Similarly, for other triplet-numbers of the set Up,s , the components of the
paired splitting-signals generated by frequencies (4p, 4s), (8p, 8s), ... can be
calculated from the same splitting-signal {fp,s,t ; t = 0 : (N − 1)}. This means
the following: For each generator (p, s) ∈ JN,N , the set U (p, s) consists of
N triplet-numbers, and the 2-D paired transform of the image on this set
is defined by the 1-D paired transform of the tensor splitting-signal fTp,s =
{fp,s,t ; t = 0 : (N − 1)}. Thus
0
{fp,s,t ; t = 0 : (N/2 − 1)},
0
{f2p,2s,2t ; t = 0 : (N/4 − 1)},
{f 0
4p,4s,4t; t = 0 : (N/8 − 1)},
χ0N [fTp,s ] =
... ... ... ,
0
{fN/2,N/2,0 },
0
{f0,0,0}.
This property will be used in the next N = 8 example, as well as in the general
case when N = 2r , r > 1.
Image Processing 121
Given generator (p, s) ∈ JN,N , the corresponding subset of triplets 2k (p, s, t),
where t = 0 : N/2k+1 − 1, when k = 0 : (r − 1), is called U (p, s). The triplet
(0, 0, 0) is also an element of this set.
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.15
Schemes of calculating the eight line-integrals of the (1, 0)-projection.
equal
1
w(t) = w1,0 (t) =
v(t) = 8v(t), t = 0 : 7,
∆x
and the 2-D paired transform data in the subset U (1, 0) is calculated by
1 0
P(1, 0) = [χ ]w,
8 8
where w denotes the vector-projection (w(0), w(1), w(2), ..., w(7))0.
124 CHAPTER 3: Image Reconstruction
2 3
1 1 1 1 1 1 1 1
6 −1 −1 −1 −1 −1 −1 −1 −1 7
6 7
6 1 1 1 1 1 1 1 17
6 7
6 −1 −1 −1 −1 −1 −1 −1 −1 7
[χ00,4,0 ] = 6
6 1 1 1 1 1 1 1 17 .
7
6 7
6 −1 −1 −1 −1 −1 −1 −1 −1 7
6 7
4 1 1 1 1 1 1 1 15
−1 −1 −1 −1 −1 −1 −1 −1
Image Processing 125
The numbered control points of eight rays for this projection are denoted
by the bullets as shown below:
0
• . . . . . . .
1• . . . . . . .
2
• . . . . . . .
(angle of rays is 0◦).
.. .. .. .. .. .. .. ..
. . . . . . . .
6• . . . . . . .
7
• . . . . . . .
The 2-D paired transform in the subset of triplets (p, s, t) ∈ U (0, 1) can be
calculated by the 8-point DPT of the vector w, which is composed from the
projection data w(t) = w1,0 (t), t = 0 : 7,
1 0
P(0, 1) = [χ ]w.
8 8
and the masks of the corresponding first seven 2-D paired functions
2 3 2 3
1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0 0
6 0 0 0 −1 0 0 0 1 7 6 1 0 0 0 −1 0 0 0 7
6 7 6 7
6 0 0 −1 0 0 0 1 0 7 6 0 0 0 −1 0 0 0 1 7
6 7 6 7
6 0 −1 0 0 0 1 0 0 7
7, [χ01,1,1 ] = 6 0 0 −1 0 0 0 1 0 7
6 7
[χ01,1,0 ] = 6
6 −1 0 0 0 1 0 0 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 0 0 1 0 0 0 −1 7 6 −1 0 0 0 1 0 0 0 7
6 7 6 7
4 0 0 1 0 0 0−1 0 5 4 0 0 0 1 0 0 0−1 5
0 1 0 0 0 −1 0 0 0 0 1 0 0 0−1 0
2 3 2 3
0 0 1 0 0 0−1 0 0 0 0 1 0 0 0−1
6 0 1 0 0 0 −1 0 0 7 6 0 0 1 0 0 0−1 0 7
6 7 6 7
6 1 0 0 0 −1 0 0 0 7 6 0 1 0 0 0 −1 0 0 7
6 7 6 7
6 0 0 0 −1 0 0 0 1 7
7, [χ01,1,3 ] = 6 1 0 0 0 −1 0 0 0 7
6 7
[χ01,1,2 ] = 6
6 0 0 −1 0 0 0 1 0 7 6 0 0 0 −1 0 0 0 1 7
6 7 6 7
6 0 −1 0 0 0 1 0 0 7 6 0 0 −1 0 0 0 1 0 7
6 7 6 7
4 −1 0 0 0 1 0 0 0 5 4 0 −1 0 0 0 1 0 0 5
0 0 0 1 0 0 0 −1 −1 0 0 0 1 0 0 0
126 CHAPTER 3: Image Reconstruction
2 3 2 3
1 0 −1 0 1 0 −1 0 0 1 0 −1 0 1 0 −1
6 0 −1 0 1 0 −1 0 1 7 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
6 −1 0 1 0 −1 0 1 0 7 6 0 −1 0 1 0 −1 0 1 7
6 7 6 7
6 0 1 0 −1 0 1 0 −1 7
7, [χ02,2,2 ] = 6 −1 0 1 0 −1 0 1 0 7
6 7
[χ02,2,0 ] = 6
6 1 0 −1 0 1 0 −1 0 7 6 0 1 0 −1 0 1 0 −1 7
6 7 6 7
6 0 −1 0 1 0 −1 0 1 7 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
4 −1 0 1 0 −1 0 1 0 5 4 0 −1 0 1 0 −1 0 1 5
0 1 0 −1 0 1 0 −1 −1 0 1 0 −1 0 1 0
2 3
1 −1 1 −1 1 −1 1 −1
6 −1 1 −1 1 −1 1 −1 1 7
6 7
6 1 −1 1 −1 1 −1 1 −1 7
6 7
0
6 −1 1 −1 1 −1 1 −1 1 7
[χ4,4,0 ] = 6
6 7.
6 1 −1 1 −1 1 −1 1 −1 7
7
6 −1 1 −1 1 −1 1 −1 1 7
6 7
4 1 −1 1 −1 1 −1 1 −1 5
−1 1 −1 1 −1 1 −1 1
Fifteen parallel rays of the diagonal projection are used to define components
of the 2-D paired transforms with triplet-numbers of U (1, 1). The number of
rays is calculated by (p + s)(N − 1) + 1 = 15, where (p, s) = (1, 1). We define
the control points of these rays by the bullets which are numbered as
0
• . . . . . . .
1• . . . . . . .
2
• . . . . . . .
(angle of rays is − 45◦).
.. .. .. .. .. .. .. ..
. . . . . . . .
6• . . . . . . .
7 8 9 10 11 12 13 14
• • • • • • • •
These masks with the rays, on which the coefficients 1 and −1 are situated,
are shown in Figures 3.16-3.18.
The sums of the discrete image along these rays are denoted by vt = v1,1 (t),
where t = 0 : 14. It is not difficult to notice that the components of the 8 × 8-
point 2-D paired transform with the triplet-numbers (p, s, t) ∈ U (1, 1) can be
calculated by
0
f1,1,0 = v0 − v4 + v8 − v12
0
f1,1,1 = v1 − v5 + v9 − v13
0
f1,1,2 = v2 − v6 + v10 − v14
0
f1,1,3 = v3 − v7 + v11 − 0
0 (3.31)
f2,2,0 = (v0 + v4 + v8 + v12 ) − (v2 + v6 + v10 + v14 )
0
f2,2,0 = (v1 + v5 + v9 + v13 ) − (v3 + v7 + v11 + 0)
0
f4,4,0 = v0 − v1 + v2 − v3 + · · · − v11 + v12 − v13 + v14
0
f0,0,0 = v0 + v1 + v2 + v3 + · · · + v11 + v12 + v13 + v14 .
Image Processing 127
y and m
3 3
0.5 l(12) 0.5
4 4
0.625 0.625 l(13)
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 l(14) 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.16
Rays along which the line-integrals are calculated for (p, s) = (1, 1).
y and m
3 3
0.5 0.5
4
l(12) 4
0.625 0.625
5 5
l(13)
0.75 0.75
6
l(14) 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1 0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1
x and n x and n
FIGURE 3.17
Rays along which the line-integrals are calculated for (p, s) = (2, 2).
3
0.5 l(12)
4
0.625 l(13)
5
0.75 l(14)
6
0.875
7
1
0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1
x and n
FIGURE 3.18
Rays along which the line-integrals are calculated for (p, s) = (4, 4).
where P(1, 1) denotes the 2-D paired transform data on the left side of sys-
0
tem of equations in (3.32). The calculation of the component f0,0,0 is repeated,
since it is obtained from the subsets U (0, 1) and U (1, 0) as well. Thus, the pro-
cedure of calculating the above components of the 2-D paired transform of the
discrete image fn,m from 15 arithmetical rays is accomplished by the 8-point
paired transform. The sums of the image v(t) = v1,1 (t) can be calculated from
the line-integrals of the image f(x, y) along the corresponding geometrical
Image Processing 129
rays
t 1
l(t) = l1,1 (t) = (x, y); x + y = + , t = 0 : 14,
8 8
where (x, y) ∈ [0, 1] × [0, 1]. Indeed, as shown in Figure 3.16, the length
√ of in-
tersection
√ of the geometrical ray with the image element equals ∆l = 2∆x =
2/N. Each integral along the geometrical ray is proportional to the sum of
the image along the corresponding arithmetical ray,
v(t) √
w(t) = w1,1 (t) = ∆l 2
= 2 · 8v(t), t = 0 : 14.
(∆x)
√
Therefore, v(t) = w(t)/(8 2), t = 0 : 14.
These two symmetric cases with generators (2, 1) and (1, 2) correspond to the
projections by angles π −tan−1 (1/2) and π −tan−1 (2/1), respectively, and are
described by similar equations. We consider in detail the case (p, s) = (2, 1).
The equations of the rays l2,1 (t) on the square [0, 1] × [0, 1] are
t 3
l(t) = l2,1 (t) = (x, y); 2x + y = + , t = 0 : 21.
8 16
l(0) l(1) l(2) l(3) l(4) l(5) l(6) l(7) l(8) l(9) l(10)l(11)l(12)l(13)l(14)
l(15)
0
0
l(16)
0.25
1
l(17)
0.25
2
l(18)
0.375
3
y and m
l(19)
0.5
4
l(20)
0.625
5
l(21)
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.19
Rays along which the sums of the image are calculated for (p, s) = (2, 1).
The paired functions with numbers (0, 4, 0) and (0, 0, 0) were considered
for the horizontal and vertical projections. The masks of the paired functions
with the first six triplet-numbers of U (2, 1) are
2 3 2 3
1 0 −1 0 1 0 −1 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 07 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
6 0 −1 0 1 0 −1 0 1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
7 , [χ02,1,1 ] = 6 0 −1 0 1 0 −1 0 1 7
6 0 0 0 0 0 0 0 07 6 7
[χ02,1,0 ] = 6
6 −1 0 1 0 −1 0 1 0 7 6 0 0 0 0 0 0 0 07
6 7 6 7
6 0 0 0 0 0 0 0 07 6 −1 0 1 0 −1 0 1 0 7
6 7 6 7
4 0 1 0 −1 0 1 0 −1 5 4 0 0 0 0 0 0 0 05
0 0 0 0 0 0 0 0 0 1 0 −1 0 1 0 −1
Image Processing 131
2 3 2 3
0 1 0 −1 0 1 0 −1 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 07 6 0 1 0 −1 0 1 0 −1 7
6 7 6 7
6 1 0 −1 0 1 0 −1 0 7 6 0 0 0 0 0 0 0 07
6 7 6 7
7 , [χ02,1,3 ] = 6 1 0 −1 0 1 0 −1 0 7
6 0 0 0 0 0 0 0 07 6 7
[χ02,1,2 ] = 6
6 0 −1 0 1 0 −1 0 1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
6 0 0 0 0 0 0 0 07 6 0 −1 0 1 0 −1 0 1 7
6 7 6 7
4 −1 0 1 0 −1 0 1 0 5 4 0 0 0 0 0 0 0 05
0 0 0 0 0 0 0 0 −1 0 1 0 −1 0 1 0
2 3 2 3
1 −1 1 −1 1 −1 1 −1 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 07 6 1 −1 1 −1 1 −1 1 −1 7
6 7 6 7
6 −1 1 −1 1 −1 1 −1 1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
7 , [χ04,2,2 ] = 6 −1 1 −1 1 −1 1 −1 1 7 .
6 0 0 0 0 0 0 0 07 6 7
[χ04,2,0 ] = 6
6 1 −1 1 −1 1 −1 1 −1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
6 0 0 0 0 0 0 0 07 6 1 −1 1 −1 1 −1 1 −1 7
6 7 6 7
4 −1 1 −1 1 −1 1 −1 1 5 4 0 0 0 0 0 0 0 05
0 0 0 0 0 0 0 0 −1 1 −1 1 −1 1 −1 1
These masks with the rays, on which the coefficients 1 and −1 are situated,
are shown in Figures 3.20 and 3.21.
The sums of the image along these rays are denoted by vt = v2,1 (t), where
t = 0 : 21. It is not difficult to notice that the components of the 2-D paired
transform of the image with the triplets of U (2, 1) can be calculated by
0
f2,1,0 = v0 − v4 + v8 − v12 + v16 − v20
0
f2,1,1 = v1 − v5 + v9 − v13 + v17 − v21
0
f2,1,2 = v3 − v7 + v11 − v15 + v19 − 0
0
f2,1,3 = v2 − v6 + v10 − v14 + v18 − 0
0 (3.33)
f4,2,0 = (v0 + v4 + v8 + v12 + v16 + v20 ) − (v2 + v6 + v10 + v14 + v18 )
0
f4,2,2 = (v1 + v5 + v9 + v13 + v17 + v21 ) − (v3 + v7 + v11 + v15 + v19 )
0
f0,4,0 = v0 − v1 + v2 − v3 + · · · + v18 − v19 + v20 − v21
0
f0,0,0 = v0 + v1 + v2 + v3 + · · · + v18 + v19 + v20 + v21 .
y and m
3 3
0.5 0.5
4 4
0.625 l(20) 0.625
5 5
0.75 0.75 l(21)
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
y and m
3 3
0.5 0.5 l(19)
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.20
Rays along which the sums of the image are calculated for (p, s) = (2, 1).
Again we can see that the calculation of the 2-D paired transform data
P(2, 1) corresponds to the 8-point discrete paired transform of the vector
a = (a0 , a1 , a2 , ..., a7)0 , i.e., P(2, 1) = [χ08 ]a.
Now we express the sums v(t) of the discrete image fn,m through the
line-integrals w(t), assuming first that these integrals are calculated along the
geometrical rays that coincide with the arithmetical rays l(t), i.e., w(t) =
w2,1 (t), t = 0 : 21. As an example, we consider the ray number seven, l(7).
As can be seen from Figure 3.22, this ray crosses the IE of number (0, 7) and
then two IE of numbers (0, 6) and (1, 6), and such intersections are repeated
on its way to the IE of number (4, 0). The length of the intersection ∆l0,7 of
the ray with the IE of number (0, 7) is twice the length of intersection with
each IE of number (0, 6) and (1, 6).
Image Processing 133
l(0) l(2) l(4) l(6) l(8) l(10) l(12) l(14) l(1) l(3) l(5) l(7) l(9) l(11) l(13)
0 0 l(15)
0 0
0.25 l(16) 0.25
1 1
0.25 0.25 l(17)
2 2
0.375 l(18) 0.375
y and m
y and m
3 3
0.5 0.5 l(19)
4 4
0.625 l(20) 0.625
5 5
0.75 0.75 l(21)
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1 0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1
x and n x and n
FIGURE 3.21
Rays along which the sums of the image are calculated for (p, s) = (4, 2).
0
l(16)
0.25
0.25
0.375
3
y and m
0.5
4
l(20)
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
√
Since ∆l0,7 =
5/2∆x, we can write the following:
√
∆l0,7 1 1 5 1 1
w(7) = w2,1 (7)= v(7) + v(6) + v(8) = 8 v(6) + v(7) + v(8) .
(∆x)2 2 2 2 2 2
134 CHAPTER 3: Image Reconstruction
For the line-integral along the ray l(8), we also can write
√ 1 1 √ 1 1
w(8) = w2,1 (8) = 4 5 v(7) + v(9) + v(8) = 4 5 v(7) + v(8) + v(9) .
2 2 2 2
Similar equations can be used for the integrals along all these geometrical
rays,
√ 1 1
w(t) = w2,1 (t) = 4 5 v(t − 1) + v(t) + v(t + 1) , t = 0 : 21.
2 2
We consider two rays which are between rays l(7), l(8) and l(8), l(9) and
call them l̃(8) and ˜ l(9), respectively. One can notice that new ray number 8
intersects equally the IE of number (0, 7), the IE of number (1, 6) and other
the IE, i.e., the length
√ of intersection of this ray with all these IEs is the same
and equals ∆l0,7 = 5/2∆x. New ray number 9 also equally intersects image
elements. The line-integrals along these two rays can be defined as
√ √
w(8) = w(˜ l(8)) = 4 5 [v(7) + v(8)] , w(9) = w(˜l(9)) = 4 5 [v(8) + v(9)] .
Thus we can simplify the calculations, by considering the shifting, t → t−1/2,
and the following new set of geometrical rays:
˜ t 1
l(t) = l2,1 (t − 1/2) = (x, y); 2x + y = + , t = 0 : 21,
8 8
which are shown in Figure 3.23. For this set of geometrical rays, we can define
the line-integrals along the rays as follows:
√
˜
w(t) = w(l(t)) = 4 5 [v(t − 1) + v(t)] , t = 0 : 21,
where v(−1) = 0. This system of equations can be written in matrix form
1 0 0 0 ... 0 0 0
1 1 0 0 ... 0 0 0
√ 0 1 1 0 ... 0 0 0
√
w = 4 5Av = 4 5 0 0 1 1 ... 0 0 0
v, (3.35)
........................
0 0 0 0 ... 1 1 0
0 0 0 0 ... 0 1 1
where w = (w(0), w(1), ..., w(21))0 and v = (v0 , v1 , ..., v21)0 . The above
Toeplitz matrix 22 × 22 has the triangle inverse matrix, which is similar to
the matrix described in (3.19) for the N = 4 example. The inverse matrix is
triangular and consists of unit diagonals whose signs alternate,
1 0 0 0 ... 0 0 0
−1 1 0 0 ... 0 0 0
1−1 1 0 ... 0 0 0
A−1 = −1 1 −1 1 ... 0 0 0 .
(3.36)
... ... ... ... ... ... ......
1−1 1 −1 ...−1 1 0
−1 1 −1 1 ... 1 −1 1
Image Processing 135
l(0) l(1) l(2) l(3) l(4) l(5) l(6) l(7) l(8) l(9) l(10)l(11)l(12)l(13)l(14) l(15)
0 l(16)
0.25
1 l(17)
0.25
2 l(18)
0.375
3 l(19)
y and m
0.5
4 l(20)
0.625
5 l(21)
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.23
New set of geometrical rays for calculating line-integrals for (p, s) = (2, 1).
Remark 3.1 We also can consider another set of geometrical rays, by using
the shifting, t → t + 1/2, of the original arithmetical rays,
˜ t 1
l(t) = l2,1 (t + 1/2) = (x, y); 2x + y = + , t = 0 : 21,
8 4
which is shown in Figure 3.24. One can notice that geometrical ray number 7
intersects equally another pair of IEs of number (0, 7) and (1, √
6). Therefore, we
can define the integral along this ray as w(7) = w(˜l(7)) = 4 5 [v(7) + v(8)] .
In general, the integrals along the geometrical rays are defined as follows:
√
w(t) = w(˜l(t)) = 4 5 [v(t) + v(t + 1)] , t = 0 : 21,
considering v(22) = 0. With the exception of the IE of number (0, 0), each
other IE is intersected by two parallel geometrical rays. This system of linear
136 CHAPTER 3: Image Reconstruction
l(0) l(1) l(2) l(3) l(4) l(5) l(6) l(7) l(8) l(9) l(10)l(11)l(12)l(13)l(14)
0 l(15)
0.25
1 l(16)
0.25
2 l(17)
0.375
3 l(18)
y and m
0.5
4 l(19)
0.625
5 l(20)
0.75
6 l(21)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.24
New set of geometrical rays for calculating line-integrals for (p, s) = (2, 1).
The above Toeplitz matrix 22 × 22 has an upper triangle inverse matrix that
is the transposition of the inverse matrix (3.36), which was used for the first
set of geometrical rays. The matrix is triangular and consists of unit diagonals
whose signs alternate,
1 −1 1−1 ...−1 ... 1 −1
0 1 −1 1 −1 ......−1 1
0 0 1−1 1 −1 ... 1 −1
−1
0 0 0 1 −1 1 ...−1 1
A = . (3.39)
0 0 0 0 1 −1 ... ...−1
... ... ... ... ... ...... ... ...
0 0 0 0 0 0 ... 1 −1
0 0 0 0 0 0 ... 0 1
Image Processing 137
b21 =w(21),
(3.40)
bt =w(t) − bt+1 , t = 20, 19, . . ., 0,
√
and, therefore, v = b/(4 5), t = 0 : 21. Thus, the solution v is calculated by
the method of back substitution.
0 l(8)
0.25
l(9)
1
l(10)
0.25
l(11)
2
l(12)
0.375
l(13)
3 l(14)
y and m
0.5
l(15)
4 l(16)
0.625
l(17)
5 l(18)
0.75
l(19)
6 l(20)
0.875
l(21)
1
0 1 2 3 4 5 6 7
FIGURE 3.25
Set of arithmetical rays for calculating line-sums for (p, s) = (1, 2).
These masks with the rays on which the coefficients 1 and −1 are situated,
are shown in Figures 3.26 and 3.27. We define and number the control points
for these rays by the bullets as shown below:
0 1 2 3 4 5 6 7
• • • • • • • •
. . . . . . 8• 9•
. . . . . . 10 • 11 •
. . . . . . 12 • 13 • −1 ◦
. . . . . . 14 • 15 • (angle of rays is − tan 1/2 = −26.565 ).
. . . . . . 16 • 17 •
. . . . . . 18 • 19 •
. . . . . . 20 • 21 •
y and m
3 3
0.5 0.5
4 l(16) 4
0.625 0.625 l(17)
5 5
0.75 0.75
6 l(20) 6
0.875 0.875 l(21)
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
y and m
3 l(14) 3
0.5 0.5 l(15)
4 4
0.625 0.625
5 l(18) 5
0.75 0.75 l(19)
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
FIGURE 3.26
Arithmetical rays along which the line-sums are calculated for (p, s) = (1, 2).
where variables vt = v1,2 (t) denote the sums of the discrete image along the
140 CHAPTER 3: Image Reconstruction
y and m
3 3
0.5 0.5 l(15)
4 l(16) 4
0.625 0.625 l(17)
5 l(18) 5
0.75 0.75 l(19)
6 l(20) 6
0.875 0.875 l(21)
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n x and n
FIGURE 3.27
Arithmetical rays along which the line-sums are calculated for (p, s) = (2, 4).
where an are calculated from the sums vt = v1,2 (t) of the discrete image by
X X
an = vn+8m = v1,2,n+8m, n = 0 : 7.
m m
The 8-point discrete paired transform of the vector a = (a0 , a1 , a2 , ..., a7)0
results in the 2-D paired transform data at points of U (1, 2),
As in the (p, s) = (2, 1) case, to calculate the vector a from the projection-
data, we will simplify the equation describing the linear relation between the
line-integrals w(t) and sums v(t), t = 0 : 21, by considering another set of
22 geometric rays. For that, we first consider the mask of the paired func-
tion χ01,2,0(n, m) with coefficients ±1 of the rays l(0), l(4), l(8), l(12), l(16),
and l(20) which are shown in Figure 3.28. One can see that the geometrical
ray l(8) intersects three image elements when x runs two intervals, 2∆x, along
Image Processing 141
l(0) l(4)
0
l(7)
0 l(8)
0.25
l(9)
1
0.25
2
l(12)
0.375
3
y and m
0.5
4 l(16)
0.625
0.75
6 l(20)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.28
The mask of number (1, 2, 0) and rays.
the horizontal. Therefore, the integral w(8) = w1,2(8) can be calculated by us-
ing three sums, v(7), v(8), and v(9). On other hand, the integral of the image
along the geometrical ray between the rays l(8) and l(9) can be calculated
from the sums of the image along two arithmetical rays by
√
w = 5/2 · 8 [v(8) + v(9)] .
This geometric ray is considered as ray number 8 in the new set of parallel
geometrical rays, which are defined as
t 1
l̃(t) = l1,2 (t + 0.5) = (x, y); x + 2y = + , t = 0 : 21,
8 4
and illustrated in Figure 3.29.
The relation between the measurements along the geometrical rays ˜l(t) and
arithmetical rays l(t) is described by the following system of linear equations:
√
w(t) = w(˜ l(t)) = 4 5 [v(t) + v(t + 1)] , t = 0 : 21,
where v(22) = 0. This system of equations was considered in matrix form in
(3.38) and (3.39), for the (p, s) = (2, 1) case. The
√ required sums v(t) of the
discrete image fn,m are calculated by v(t) = bt /4 5, where the coefficients bt
can be calculated in the following recurrent form:
b21 = w(21),
(3.43)
bt = w(t) − bt+1 , t = 20, 19, . . . , 1, 0.
142 CHAPTER 3: Image Reconstruction
0.5
l(15)
4
l(16)
0.625
l(17)
5
l(18)
0.75
l(19)
6
l(20)
0.875
l(21)
7
1
0 1 2 3 4 5 6 7
FIGURE 3.29
New set of geometrical rays for calculating line-integrals for (p, s) = (1, 2).
Remark 3.2 Another set of shifted parallel geometrical rays can also be con-
sidered. As an example, we consider the rays defined as
t 1
l̃(t) = l1,2 (t − 0.5) = (x, y); x + 2y = + , t = 0 : 21,
8 8
b0 =w(0),
(3.44)
bt =w(t) − bt−1 , t = 1, 2, . . . , 20, 21.
Image Processing 143
0.5
l(16)
4
l(17)
0.625
l(18)
5
l(19)
0.75
l(20)
6
l(21)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.30
New set of geometrical rays for calculating line-integrals for (p, s) = (1, 2).
Since the masks of the paired functions χ04,4,0 and χ00,0,0 were given above, we
consider functions with the first six triplet-numbers of the subset U (1, 3),
2 3 2 3
1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0 0
6 0 −1 0 0 0 1 0 0 7 6 0 0 −1 0 0 0 1 0 7
6 7 6 7
6 0 0 1 0 0 0−1 0 7 6 0 0 0 1 0 0 0−1 7
6 7 6 7
6 0 0 0 −1 0 0 0 1 7
7 , [χ01,3,1 ] = 6 1 0 0 0 −1 0 0 0 7
6 7
[χ01,3,0 ] = 6
6 −1 0 0 0 1 0 0 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 1 0 0 0 −1 0 0 7 6 0 0 1 0 0 0 −1 0 7
6 7 6 7
4 0 0 −1 0 0 0 1 0 5 4 0 0 0 −1 0 0 0 1 5
0 0 0 1 0 0 0−1 −1 0 0 0 1 0 0 0
144 CHAPTER 3: Image Reconstruction
2 3 2 3
0 0 1 0 0 0−1 0 0 0 0 1 0 0 0−1
6 0 0 0 −1 0 0 0 1 7 6 1 0 0 0 −1 0 0 0 7
6 7 6 7
6 −1 0 0 0 1 0 0 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 1 0 0 0 −1 0 0 7
7 , [χ01,3,3 ] = 6 0 0 1 0 0 0 −1 0 7
6 7
[χ01,3,2 ] = 6
6 0 0 −1 0 0 0 1 0 7 6 0 0 0 −1 0 0 0 1 7
6 7 6 7
6 0 0 0 1 0 0 0−1 7 6 −1 0 0 0 1 0 0 0 7
6 7 6 7
4 1 0 0 0 −1 0 0 0 5 4 0 1 0 0 0 −1 0 0 5
0 −1 0 0 0 1 0 0 0 0 −1 0 0 0 1 0
2 3 2 3
1 0 −1 0 1 0 −1 0 0 −1 0 1 0 −1 0 1
6 0 1 0 −1 0 1 0 −1 7 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
6 −1 0 1 0 −1 0 1 0 7 6 0 1 0 −1 0 1 0 −1 7
6 7 6 7
6 0 −1 0 1 0 −1 0 1 7
7 , [χ02,6,2 ] = 6 −1 0 1 0 −1 0 1 0 7
6 7
[χ02,6,0 ] = 6
6 1 0 −1 0 1 0 −1 0 7 6 0 −1 0 1 0 −1 0 1 7
6 7 6 7
6 0 1 0 −1 0 1 0 −1 7 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
4 −1 0 1 0 −1 0 1 0 5 4 0 1 0 −1 0 1 0 −1 5
0 −1 0 1 0 −1 0 1 −1 0 1 0 −1 0 1 0
The masks of these paired functions are shown in Figures 3.31 and 3.32,
together with the rays the pass through the coefficients ±1 of the masks.
The set of 29 geometrical rays of this projection,
t 1
l(t) = l1,3 (t) = (x, y); x + 3y = + , t = 0 : 28,
8 4
y and m
3 3 l(17)
0.5 0.5
4 l(20) 4 l(21)
0.625 0.625
5 l(24) 5
0.75 0.75 l(25)
6 6
0.875 l(28) 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
y and m
3 l(18) 3
0.5 0.5 l(19)
4 4
0.625 l(22) 0.625
5 5 l(23)
0.75 0.75
6 l(26) 6 l(27)
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
FIGURE 3.31
Masks of the paired functions with triplet-numbers (1, 3, t), t = 0, 1, 2, 3.
0
f2,6,0 = (v0 + v4 + v8 + v12 + v16 + v20 + v24 + v28 )
−(v2 + v6 + v10 + v14 + v18 + v22 + v26 ),
0
f2,6,2 = (v1 + v5 + v9 + v13 + v17 + v21 + v25 )
−(v3 + v7 + v11 + v15 + v19 + v23 + v27 ),
0
f4,4,0 = v0 − v1 + v2 − v3 + · · · + v18 − v19 + v20 − v21 ,
0
f0,0,0 = v0 + v1 + v2 + v3 + · · · + v18 + v19 + v20 + v21 ,
where variables vt = v1,3 (t) denote the sums of the discrete image along the
146 CHAPTER 3: Image Reconstruction
y and m
3 l(18) 3
0.5 0.5 l(19)
4 l(20) 4 l(21)
0.625 l(22) 0.625
5 5 l(23)
l(24)
0.75 0.75 l(25)
6 l(26) 6 l(27)
0.875 l(28) 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n x and n
FIGURE 3.32
Masks of the paired functions with triplet-numbers (2, 6, t), t = 0, 2.
0.5
l(18)
l(19)
4 l(20)
0.625
l(21)
l(22)
5 l(23)
0.75
l(24)
l(25)
6 l(26)
0.875
l(27)
l(28)
7
1
0 1 2 3 4 5 6 7
FIGURE 3.33
The set of arithmetical rays for the (1, 3)-projection.
where an are calculated from the sums vt = v1,3 (t) of the discrete image by
X X
an = vn+8m = v1,3,n+8m, n = 0 : 7.
m m
The 8-point discrete paired transform of the vector a = (a0 , a1 , a2 , ..., a7)0
results in the 2-D paired transform data at points of U (1, 3), i.e., P(1, 3) =
[χ08 ]a. To calculate the vector a from the projection data, we will define a set
of geometrical rays that allow calculation of the integrals w(t) by means of
the sums v(t), t = 0 : 28. For that, we first consider a few arithmetical rays as
the geometrical rays in the part of the square [0, 1] × [0, 1], which are shown
in Figure 3.34. One can notice that each of five rays equally intersects image
0.5
l(19)
4 l(20)
l(21)
0.625
l(22)
5 l(23)
0.75
y and m
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.34
Five rays of the projection corresponding (1, 3).
Similar equations hold for all integrals w(t) of the considered projection
√
w(t) = w1,3 (t) = 8 10/3 [v(t − 1) + v(t) + v(t + 1)] , t = 0 : 28.
which is not triangular and has determinant 0. In other words, the given set
of geometrical rays cannot be used to define all required sums v(t), t = 0 : 21,
for the considered projection. Therefore, as for the projections defined by
frequency-points (p, s) = (2, 1) and (1, 2), we consider other sets of rays. The
simple way to select such a set is to remove the first ray from the set and add
one parallel new ray at the end, or remove the last ray from the set and add
one new parallel ray at the beginning. We consider the first case.
Case 1: The set of 29 geometrical rays is defined as (see Figure 3.35)
t 3
l̃(t) = l1,3 (t + 1) = (x, y); x + 3y = + , t = 0 : 28,
8 8
and the integrals along these rays are denoted by w(t) = w(˜l(t)).
One can see, for instance, that ˜
√ w(l(1)) = w(l(2)) = v(1) + v(2) + v(3),
up to the normalized coefficient 8 10/3. The system of equations for all new
integrals w(t) of the considered projection can be defined as follows:
√
w(t) = w(˜ l(t)) = 8 10/3 [v(t) + v(t + 1) + v(t + 2)] , t = 0 : 28,
0.5
l(17)
l(18)
4 l(19)
0.625
l(20)
l(21)
5 l(22)
0.75
l(23)
l(24)
6 l(25)
0.875
l(26)
l(27)
7 l(28)
1
0 1 2 3 4 5 6 7
FIGURE 3.35
The set of geometrical rays for the projection defined by (1, 3).
The above Toeplitz matrix 29 × 29 has the upper triangle inverse matrix
1 −1 0 1 −1 0 1 −1 ... 0 1 −1
0 1 −1 0 1 −1 0 1 ...−1 0 1
0 0 1 −1 0 1 −1 0 ... 1 −1 0
0 0 0 1 −1 0 1 −1 ... 0 1 −1
−1
0 0 0 0 1 −1 0 1 ...−1 0 1
A = . (3.48)
. . . . . . . . ... . . .
0 0 0 0 0 0 0 1 ...−1 0 1
0 0 0 0 0 0 0 0 ... 1 −1 0
0 0 0 0 0 0 0 0 ... 0 1 −1
0 0 0 0 0 0 0 0 ... 0 0 1
The √ required sums v(t) of the discrete image are calculated by v(t) =
bt /(8 10/3), where t = 0 : 28.
Case 2: The set of 29 geometrical rays can also be defined as (see Fi-
gure 3.36)
t 1
l̃(t) = l1,3 (t − 1) = (x, y); x + 3y = + , t = 0 : 28.
8 8
0.5
l(19)
l(20)
4 l(21)
0.625
l(22)
l(23)
5 l(24)
0.75
l(25)
l(26)
6 l(27)
0.875
l(28)
1
0 1 2 3 4 5 6 7
FIGURE 3.36
Second set of geometrical rays for the (1, 3)-projection.
In this case, the line-integrals w(t) are defined by the sums v(t) as
√
w(t) = w(˜l(t)) = 8 10/3 [v(t) + v(t − 1) + v(t − 2)] , t = 0 : 28. (3.50)
Remark 3.3 Instead of the subset U (1, 3), we can consider the subset U (3, 1),
(3, 1, 0), (3, 1, 1), (3, 1, 2), (3, 1, 3),
(6, 2, 0), (6, 2, 2),
U (3, 1) =
(4, 4, 0),
(0, 0, 0).
Indeed, it is not difficult to see that the paired functions generated by the fre-
quency (p, s) = (3, 1) are χ03,1,t = ±χ01,3,t mod 4 , where the sign is determined
by sign(4 − t mod 8), for t = 0, 1, 2, 3. These two points (1, 3) and (3, 1) gener-
ate the same group T1,3 = T3,1 in the frequency domain. It also means that all
1’s and all −1’s are located on the parallel rays at the angles π − tan−1 (1/3)
and π − tan−1 (3/1) to the horizontal. As an example, Figure 3.37 shows the
mask of the function χ03,1,0 = χ01,3,0 and two sets of parallel rays, along which
the coefficients ±1 of the function are located. For the (3, 1)-projection, the
152 CHAPTER 3: Image Reconstruction
y and m
3 3
0.5 0.5
4 4 l(20)
0.625 l(28) 0.625
5 5 l(24)
0.75 0.75
6 6
0.875 0.875 l(28)
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n x and n
FIGURE 3.37
Two sets of rays on the mask of the paired function with number (3, 1, 0).
control points of the second set of rays are defined as shown below:
0
• . . . . . . .
1 • . . . . . . .
2
• . . . . . . .
3
• . . . . . . . −1 ◦
• . . . . . . . (angle of rays is π − tan (3) = 108.435 ).
4
5 8 11 14 17 20 23 26
• • • • • • • •
6 9 12 15 18 21 24 27
• • • • • • • •
7 10 13 16 19 22 25 28
• • • • • • • •
l(0) l(2) l(4) l(6) l(8) l(10) l(12) l(14) l(16) l(18) l(20) l(22)
0 l(23)
0
0.25 l(24)
1
0.25 l(25)
2
0.375 l(26)
3
y and m
0.5 l(27)
4
0.625 l(28)
5
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.38
The set of arithmetical rays for the (3, 1)-projection.
2 3 2 3
0 0 −1 0 0 0 1 0 0 1 0 0 0 −1 0 0
6 0 0 0 1 0 0 0 −1 7 6 0 0 −1 0 0 0 1 0 7
6 7 6 7
6 1 0 0 0 −1 0 0 0 7 6 0 0 0 1 0 0 0−1 7
6 7 6 7
6 0 −1 0 0 0 1 0 0 7
7, [χ03,1,3 ] =6 1 0 0 0 −1 0 0 0 7
6 7
[χ03,1,2 ] =6
6 0 0 1 0 0 0−1 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 0 0 −1 0 0 0 1 7 6 0 0 1 0 0 0 −1 0 7
6 7 6 7
4 −1 0 0 0 1 0 0 0 5 4 0 0 0 −1 0 0 0 1 5
0 1 0 0 0 −1 0 0 −1 0 0 0 1 0 0 0
2 3 2 3
1 0 −1 0 1 0 −1 0 0 −1 0 1 0 −1 0 1
6 0 1 0 −1 0 1 0 −1 7 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
6 −1 0 1 0 −1 0 1 0 7 6 0 1 0 −1 0 1 0 −1 7
6 7 6 7
0
6 0 −1 0 1 0 −1 0 1 7 0
6 −1 0 1 0 −1 0 1 0 7
[χ6,2,0 ] =66
7, [χ6,2,2 ] =6 0 −1 0 1 0 −1 0 1 7
7 6 7
6 1 0 −1 0 1 0 −1 0 7 6 7
6 0 1 0 −1 0 1 0 −1 7 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
4 −1 0 1 0 −1 0 1 0 5 4 0 1 0 −1 0 1 0 −1 5
0 −1 0 1 0 −1 0 1 −1 0 1 0 −1 0 1 0
The masks of these paired functions are shown in Figures 3.39 and 3.40,
together with the rays passing through the coefficients ±1 of the masks.
154 CHAPTER 3: Image Reconstruction
l(0) l(4) l(8) l(12) l(16) l(20) l(1) l(5) l(9) l(13) l(17) l(21)
0 0
0 0
0.25 l(24) 0.25
1 1
0.25 0.25 l(25)
2 2
0.375 0.375
y and m
y and m
3 3
0.5 0.5
4 4
0.625 l(28) 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
l(2) l(6) l(10) l(14) l(18) l(22) l(3) l(7) l(11) l(15) l(19)
0 0 l(23)
0 0
0.25 0.25
1 1
0.25 0.25
2 2
0.375 l(26) 0.375
y and m
y and m
3 3
0.5 0.5 l(27)
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.39
Masks of the paired functions with triplet-numbers (3, 1, t), t = 0, 1, 2, 3.
where variables vt = v3,1 (t) denote the sums of the discrete image along the
Image Processing 155
l(0)l(2)l(4)l(6)l(8)l(10)
l(12)
l(14)
l(16)
l(18)
l(20)
l(22) l(1)l(3)l(5)l(7)l(9)l(11)
l(13)
l(15)
l(17)
l(19)
l(21)
0 0 l(23)
0 0
0.25 l(24) 0.25
1 1
0.25 0.25 l(25)
2 2
0.375 l(26) 0.375
y and m
y and m
3 3
0.5 0.5 l(27)
4 4
0.625 l(28) 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1 0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1
x and n x and n
FIGURE 3.40
Masks of the paired functions with triplet-numbers (6, 2, t), t = 0, 2.
The 8-point discrete paired transform of the vector a = (a0 , a1 , a2 , ..., a7)0
results in the 2-D paired transform data at points of U (3, 1),
P(3, 1) = [χ08,8 ]a.
To calculate the vector a from the projection data, we will define a set of
geometrical rays that allows calculation of the integrals w(t) by means of the
sums v(t), t = 0 : 28. For that, we first consider a few arithmetical rays as the
geometrical rays in the square [0, 1] × [0, 1], which are shown in Figure 3.41.
We define two geometrical rays l̃(8) = l(7) and ˜l(9) = l(8). One can see that
the line-integrals along these rays can be calculated as follows:
√
w(8) = w(˜l(8))= 8√10/3 [v(6) + v(7) + v(8)] ,
(3.56)
w(9) = w(˜l(9))= 8 10/3 [v(7) + v(8) + v(9)] .
156 CHAPTER 3: Image Reconstruction
0.25
0.25
0.375
3
y and m
0.5
0.625
0.75
0.875
1
0 1 2 3
FIGURE 3.41
Eight rays of the (3, 1)-projection.
To work with similar equations for all line-integrals w(t) of the considered
projection,
√
w(t) = w(˜
l(t)) = 8 10/3 [v(t) + v(t − 1) + v(t − 2)] , t = 0 : 28, (3.57)
A similar system of equations was described in (3.50)-(3.53) for the (1, 3)-
projection. This system has the following solution:
√
v(t) = 3bt /(8 10), t = 0 : 28,
b0 =w(0),
b1 =w(1) − b0 ,
b2 =w(2) − (b1 + b0 ), (3.58)
b3 =w(3) − (b2 + b1 ),
bt =w(t) − (bt−1 + bt−2 ), t = 4, 5, . . . , 27, 28.
Image Processing 157
l(0) l(2) l(4) l(6) l(8) l(10) l(12) l(14) l(16) l(18) l(20) l(22)
0 l(24)
0
0.25 l(25)
1
0.25 l(26)
2
0.375 l(27)
3
y and m
0.5 l(28)
4
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.42
The set of geometrical rays for the (3, 1)-projection.
l(0) l(2) l(4) l(6) l(8) l(10) l(12) l(14) l(16) l(18) l(20)
0 l(22)
0
0.25 l(23)
1
0.25 l(24)
2
0.375 l(25)
3
y and m
0.5 l(26)
4
0.625 l(27)
5
0.75 l(28)
6
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.43
The second set of geometrical rays for the (3, 1)-projection.
recurrent form,
b28 =w(28),
b27 =w(27) − b28 ,
(3.60)
b26 =w(26) − (b27 + b28 ),
bt =w(t) − (bt+1 + bt+2 ), t = 25, 24, . . ., 1, 0.
The paired functions with numbers (2, 0, 0), (0, 2, 2), (0, 2, 0), (0, 2, 2),
(4, 0, 0), (0, 4, 0), and (0, 0, 0) were described above. We thus consider the
paired functions with other triplet-numbers. Four masks of the paired func-
tions with the triplet-numbers (1, 4, t), t = 0 : 3, are
1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0 0
−1 0 0 0 1 0 0 0 0 −1 0 0 0 1 0 0
1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0 0
0
−1 0 0 0 1 0 0 0 0
0 −1 0 0 0 1 0 0
[χ1,4,0] =
, [χ1,4,1] = 0 1 0 0 0 −1 0 0 ,
1 0 0 0 −1 0 0 0
−1 0 0 0 1 0 0 0 0 −1 0 0 0 1 0 0
1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0 0
−1 0 0 0 1 0 0 0 0 −1 0 0 0 1 0 0
0 0 1 0 0 0 −1 0 0 0 0 1 0 0 0 −1
0
0 −1 0 0 0 10
0
0 0 −1 0 0 0 1
0
0 1 0 0 0 −1 0
0
0 0 1 0 0 0 −1
0 0 −1 0 0 0 10 0 0 0 −1 0 0 0 1
[χ01,4,2] = , [χ01,4,3] = .
0
0 1 0 0 0 −1 0
0
0 0 1 0 0 0 −1
0
0 −1 0 0 0 10
0
0 0 −1 0 0 0 1
0 0 1 0 0 0 −1 0 0 0 0 1 0 0 0 −1
0 0 −1 0 0 0 10 0 0 0 −1 0 0 0 1
(1 + 4)7 + 1 = 36 parallel rays are considered for the (1, 4)-projection. The
control points of the set of rays are defined as shown below:
0 1 2 3 4 5 6 7
• • • • • • • •
. . . . 8 • 9 • 10 • 11 •
. . . . 12 • 13 • 14 • 15 •
. . . . 16 • 17 • 18 • 19 • −1 ◦
. . . . 20 • 21 • 22 • 23 • (angle of rays is − tan (1/4) = −14.036 ).
. . . . 24 • 25 • 26 • 27 •
. . . . 28 • 29 • 30 • 31 •
. . . . 32 • 33 • 34 • 35 •
where (x, y) ∈ [0, 1] × [0, 1], is shown in Figure 3.44. These rays are also shown
separately on the masks of the paired functions χ01,4,t, t = 0 : 3, in Figure 3.45.
l(21)
0.5 l(22)
l(23)
4 l(24)
l(25)
0.625 l(26)
l(27)
5 l(28)
l(29)
0.75 l(30)
l(31)
6 l(32)
l(33)
0.875 l(34)
l(35)
7
1
0 1 2 3 4 5 6 7
FIGURE 3.44
The sets of rays for the (1, 4)-projection.
Two masks for the paired functions χ02,0,t, t = 0, 2, are shown in Fi-
gure 3.46. The corresponding components of the 2-D paired transform are
calculated by
0
f2,0,0 =(v0 + v4 + v8 + v12 + v16 + v20 + v24 + v28 + v32 )
−(v2 + v6 + v10 + v14 + v18 + v22 + v26 + v30 + v34 ),
0 (3.62)
f2,0,2 =(v1 + v5 + v9 + v13 + v17 + v21 + v25 + v29 + v33 )
−(v3 + v7 + v11 + v15 + v19 + v23 + v27 + v31 + v35 ).
0
Similarly, for the remaining two components, we have the following: f4,0,0 =
0
v0 − v1 + v2 − v3 + · · · + v34 − v35 and f0,0,0 = v0 + v1 + v2 + v3 + · · · + v34 + v35 .
Introducing the new variables
X X
an = vn+8m = v1,4,n+8m, n = 0 : 7,
m m
Image Processing 161
y and m
3 3 l(21)
0.5 0.5
4 l(24) 4 l(25)
0.625 0.625
5 l(28) 5 l(29)
0.75 0.75
6 l(32) 6 l(33)
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
3
y and m 3
0.5 l(22) 0.5 l(23)
4 4
0.625 l(26) 0.625 l(27)
5 5
0.75 l(30) 0.75 l(31)
6 6
0.875 l(34) 0.875 l(35)
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
FIGURE 3.45
Four masks with the set of arithmetical rays for the paired functions with
triplet-numbers (1, 4, t), t = 0 : 3.
the complete system of linear equations for the set P(1, 4) with eight compo-
nents fp0 1 ,s1 ,t , (p1 , s1 , t) ∈ U (1, 4), can be written as follows:
0
f1,4,0 =a0 − a4
0
f1,4,1 =a1 − a5
0
f1,4,2 =a2 − a6
0
f1,4,3 =a3 − a7
0 (3.63)
f2,0,0 =(a0 + a4 ) − (a2 + a6 )
0
f2,0,2 =(a1 + a5 ) − (a3 + a7 )
0
f4,0,0 =(a0 + a4 ) − (a1 + a5 ) + (a2 + a6 ) − (a3 + a7 )
0
f0,0,0 =(a0 + a4 ) + (a1 + a5 ) + (a2 + a6 ) + (a3 + a7 ).
These calculations correspond to the 8-point discrete paired transform of the
vector a = (a0 , a1 , a2 , ..., a7)0 , i.e., P(1, 4) = [χ08 ]a.
To express the sums v(t) of the discrete image fn,m through the line-
integrals w(t) = w1,4 (t), we consider the part of the mask of the paired func-
162 CHAPTER 3: Image Reconstruction
y and m
3 3 l(21)
0.5
l(22) 0.5 l(23)
4 l(24) 4 l(25)
0.625
l(26) 0.625 l(27)
5 l(28) 5 l(29)
0.75
l(30) 0.75 l(31)
6 l(32) 6 l(33)
0.875 l(34) 0.875 l(35)
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n x and n
FIGURE 3.46
Two masks with the set of arithmetical rays for the paired functions with
triplet-numbers (2, 0, t), t = 0, 1.
tion with number (1, 4, 0), which is shown in Figure 3.47. The geometrical ray
l(29) between two points of the discrete image, (0, 7) and (5, 6) passes through
six image elements of numbers (0, 7), (1, 7), (2, 7), (3, 7), (3, 6), and (4, 6). The
length of the intersection ∆l0,7 of the ray with the IE of number (0, 7) is twice
the length of intersection with each IE of number (3, 7) and (3, 6), but equal
to the length
√ of intersection with the IE of numbers (1, 7) and (2, 7). Since
∆l0,7 = 17/4∆x, we can write the following:
∆l0,7 1 1
w(29) = w1,4(29) = v(28) + v(29) + v(30) + v(31) + v(27) .
(∆x)2 2 2
Similar equations can be used for calculating other integrals w(t), t = 0 : 35,
and then the sums v(t) can be found.
Now we consider the geometrical rays l1 and l2 between rays 28, 29, and
29, 30, respectively. The length of the intersection of ray l1 with √the image
elements of numbers (0, 7), (1, 7), (2, 7), and (3, 6) is the same, 17/4∆x.
The length of the intersection of ray l2 √ with each image element of num-
ber (0, 7), (1, 7), (2, 7), and (3, 7) is also 17/4∆x. Therefore, the integrals
w1 and w2 of the image along the shifted rays l1 and l2 , respectively, can be
written as follows:
√
17/4∆x
w1 = [v(28) + v(29) + v(30) + v(27)]
(∆x)2
√
=2 17 [v(27) + v(28) + v(29) + v(30)] ,
√
w2 =2 17 [v(28) + v(29) + v(30) + v(31)] .
These equations can be generalized and we consider two ways to do that.
Image Processing 163
0.625
l(27)
5 l(28)
l(29)
0.75 l(30)
l(31)
6 l(32)
y and m
0.875
l1
1
l2
0 1 2 3 4 5 6 7
FIGURE 3.47
Set of geometrical rays for calculating line-integrals when (p, s) = (1, 4).
0 l(9)
0.25 l(11)
1 l(13)
0.25 l(15)
2 l(17)
0.375 l(19)
3 l(21)
y and m
0.5 l(23)
4 l(25)
0.625 l(27)
5 l(29)
0.75 l(31)
6 l(33)
0.875 l(35)
1
0 1 2 3 4 5 6 7
FIGURE 3.48
The first set of geometrical rays for the (1, 4)-projection.
where w = (w0 , w1 , ..., w35)0 and v = (v0 , v1 , ..., v35)0 . The above Toeplitz
Image Processing 165
0.5
l(21)
4
l(23)
0.625
l(25)
5
l(27)
0.75
l(29)
6
l(31)
0.875
l(33)
7
l(35)
1
0 1 2 3 4 5 6 7
FIGURE 3.49
The second set of geometrical rays for the (1, 4)-projection.
procedure:
b0 =w(0),
b1 =w(1) − b0 ,
b2 =w(2) − (b1 + b0 ),
(3.66)
b3 =w(3) − (b2 + b1 + b0 ),
b4 =w(4) − (b3 + b2 + b1 ),
bt =w(t) − (bt−1 + bt−2 + bt−3 ), t = 5, 6, . . . , 35.
In the second case, the integrals along the set of geometrical rays can be
defined by equations
√
w(t) = 2 17 [v(t) + v(t + 1) + v(t + 2) + v(t + 3)] , t = 0 : 35,
where v(36) = v(37) = v(38) = 0. This system of linear equations can be
written in matrix form as
111100 ... 0 0 0
0 1 1 1 1 0 ... 0 0 0
0 0 1 1 1 0 ... 0 0 0
√ √
w = 2 17Av = 2 17 0 0 0 1 1 1 ... 0 0 0
v, (3.67)
.. .. .. .. .. .. . ..
. . . . . .
... .. .
0 0 0 0 0 0 ... 0 1 1
000000 ... 0 01
where w = (w0 , w1 , ..., w35)0 and v = (v0 , v1 , ..., v35)0 . The above Toeplitz
matrix 36 × 36 has the following triangle inverse matrix:
1 −1 0 0 1 −1 0 0 1 −1 0 ... 1 −1 0 0
0 1−1 0 0 1 −1 0 0 1 −1 ... 0 1 −1 0
0 0 1 −1 0 0 1−1 0 0 1 ... 0 0 1 −1
0 0 0 1 −1 0 0 1 −1 0 0 ...−1 0 0 1
0 0 0 0 1 −1 0 0 1 −1 0 ... 1 −1 0 0
0 0 0 0 0 1 −1 0 0 1 −1 ... 0 1 −1 0
A−1 = . . . . . . . . . . . ... . . . . .
(3.68)
0 0 0 0 0 0 0 0 0 0 1 ... 0 0 1 −1
0 0 0 0 0 0 0 0 0 0 0 ...−1 0 0 1
0 0 0 0 0 0 0 0 0 0 0 ... 1 −1 0 0
0 0 0 0 0 0 0 0 0 0 0 ... 0 1 −1 0
0 0 0 0 0 0 0 0 0 0 0 ... 0 0 1 −1
0 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 1
Thirty-six rays of this projection are used to define all components of the
2-D paired transforms with triplet-numbers of U (4, 1). We define the control
points of the set of rays as shown below:
0
• . . . . . . .
1 • . . . . . . .
2
• . . . . . . .
3
• . . . . . . .
5 8 12 16 20 24 28 32 (angle of rays is − tan−1 (4) = −75.964◦).
• • • • • • • •
5 9 13 17 21 25 29 33
• • • • • • • •
6 10 14 18 22 26 30 34
• • • • • • • •
7 11 15 19 23 27 31 35
• • • • • • • •
where (x, y) ∈ [0, 1] × [0, 1], is shown in Figure 3.50 on the masks of the paired
functions χ04,1,t, t = 0 : 3.
The components of the 2-D paired transform with the triplet-numbers
(4, 1, t) are calculated by
0
f4,1,0 =v0 − v4 + v8 − v12 + v16 − v20 + v24 − v28 + v32
0
f4,1,1 =v1 − v5 + v9 − v13 + v17 − v21 + v25 − v29 + v33
0 (3.70)
f4,1,2 =v2 − v6 + v10 − v14 + v18 − v22 + v26 − v30 + v34
0
f4,1,3 =v3 − v7 + v11 − v15 + v19 − v23 + v27 − v31 + v35
168 CHAPTER 3: Image Reconstruction
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
y and m
3 l(34) 3
0.5 0.5
4 4 l(35)
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.1250.250.3750.50.6250.750.875 1 0 0.1250.250.3750.50.6250.750.875 1
x and n x and n
FIGURE 3.50
Masks and rays for calculating line-integrals for the (4, 1)-projection.
where the sums of the discrete image along the rays are denoted by vt = v4,1 (t),
t = 0 : 35. With the new variables
X X
an = vn+8m = v4,1,n+8m, n = 0 : 7,
m m
the complete system of linear equations, which defines the subset P(4, 1) of
components of the 2-D paired transform with the triplet-numbers of the subset
Image Processing 169
To express the sums v(t) of the discrete image fn,m through the line-
integrals w(t), we consider in detail the part of the mask of the paired func-
tion with number (4, 1, 0), which is shown in Figure 3.51. The geometrical
ray l1 between rays l(6) and l(7) passes through six image elements of num-
bers (0, 7), (0, 6), (0, 5), (1, 4), (1, 3), (1, 2), (1, 1), and (2, 0). The length of the
intersection ∆l0,7 of the ray with the IE of number (0, 7) equals the length
of the intersection
√ of the ray with each of the remaining seven IEs. Since
∆l0,7 = 17/4∆x, we can write the following:
∆l0,7
w1 = w(l1 ) = [v(7) + v(6) + v(5) + v(8)] .
(∆x)2
For the geometrical ray l2 , which is between rays l(7) and l(8), we obtain
∆l0,7
w2 = w(l2 ) = [v(7) + v(6) + v(9) + v(8)] .
(∆x)2
These equations can be used for calculating other integrals w(t), t = 0 : 35,
and then the sums v(t) can be found. Similar to the (p, s) = (1, 4) case, these
equations can be generalized, and we consider two ways to do that.
Case 1: The line-integral w1 can be denoted by w(8), and w2 by w(9).
Case 2: The line-integral w1 can be denoted by w(5), and w2 by w(6).
In the first case, we consider the set of geometrical parallel rays, which are
defined by the shifting, t → t − 3/2,
t 1
l̃(t) = l4,1 (t − 3/2) = (x, y); 4x + 1y = + , t = 0 : 35.
8 8
These rays are shown in Figure 3.52, and the original set of arithmetical rays
is shown in Figure 3.53.
170 CHAPTER 3: Image Reconstruction
0.25
0.25
0.375
3
y and m
0.5
0.625
0.75
0.875
1
l l 0 1 2
1 2
0 0.125 0.25 0.375
x and n
FIGURE 3.51
Set of geometrical rays for calculating line-integrals when (p, s) = (4, 1).
b0 =w(0),
b1 =w(1) − b0 ,
b2 =w(2) − (b1 + b0 ),
(3.72)
b3 =w(3) − (b2 + b1 + b0 ),
b4 =w(4) − (b3 + b2 + b1 ),
bt =w(t) − (bt−1 + bt−2 + bt−3 ), t = 5, 6, . . . , 35.
For the second case, we consider the set of geometrical parallel rays defined
Image Processing 171
0 l(32)
0.25 l(33)
0.25 l(34)
0.375 l(35)
3
y and m
0.5
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.52
The set of geometrical rays for the (4, 1)-projection.
0 l(31)
0.25
1 l(32)
0.25
2 l(33)
0.375
3 l(34)
y and m
0.5
4 l(35)
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.53
The set of arithmetical rays for the (4, 1)-projection.
The masks of the paired functions χ04,4,0 and χ00,0,0 , as well as χ02,2,0 and
χ02,2,2
were given above. Therefore, we consider only masks with the first four
Image Processing 173
0.25 l(30)
0.25 l(31)
0.375 l(32)
3
y and m
0.5 l(33)
0.625 l(34)
0.75 l(35)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.54
The 2nd set of geometrical rays for the (4, 1)-projection.
It should be noted that the same set of masks can be referred to as the
masks for the subset U (5, 1),
(5, 1, 0), (5, 1, 1), (5, 1, 2), (5, 1, 3),
(2, 2, 0), (2, 2, 2),
U (5, 1) =
(4, 4, 0),
(0, 0, 0).
Indeed, the following is valid: χ05,1,2t = χ01,5,2t and χ05,1,2t+1 = −χ01,5,2t+1, for
t = 0, 1.
The set of all (p + s)(N − 1) + 1 = 6(7) + 1 = 43 arithmetical rays of the
projection by the angle π − tan−1 (5) is shown in Figure 3.55.
0.5 l(26)
4 l(28)
0.625 l(30)
l(32)
5
l(34)
0.75 l(36)
6 l(38)
0.875 l(40)
l(42)
7
1
0 1 2 3 4 5 6 7
FIGURE 3.55
The set of arithmetical rays for the (5, 1)-projection.
l(0) l(4)
0
0 l(8)
0.25
l(12)
1
0.25 l(16)
2
0.375 l(20)
3
l(24)
y and m
0.5
4 l(28)
0.625
l(32)
5
0.75 l(36)
6
l(40)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.56
The mask [χ01,5,0] with the set of arithmetical rays of the (1, 5)-projection.
χ01,5,0 with the parallel arithmetical rays of two different projections. Eleven
rays of the (1, 5)-projection are shown in the first figure, and seven rays of the
(1, −3)-projection are shown in the second figure.
The number of parallel rays for the (1, −3)-projection equals (1 +3)7 +1 =
29, which is less than 43. The set of all rays for this projection is shown in
Figure 3.58. The control points of this set of rays are given below
0
• 1 • 2 • 3 • 4• 5 • 6• 7 •
−3 • −2 • −1 • . . . . .
−6 −5 −4
−9 • −8 • −7 • . . . . .
−12 • −11 • −10 • . . . . . (angle of rays is tan−1 (1/3) = 18.435◦).
−15 • −14 • −13 • . . . . .
−18 • −17 • −16 • . . . . .
• • • . . . . .
−21 −20 −19
• • • . . . . .
The set of the 29 geometrical rays of this projection is described as
t 1
l(t) = l1,−3 (t) = (x, y); x − 3y = − , t = 7 : −1 : −21, (3.74)
8 8
176 CHAPTER 3: Image Reconstruction
l(4)
0
0.25
1
l(4)
0.25
0.375 l(0)
3
y and m
0.5
4
l(−4)
0.625
5
l(−8)
0.75
0.875 l(−12)
7
1
l(−20) l(−16)
0 1 2 3 4 5 6 7
FIGURE 3.57
The mask [χ01,5,0] with the set of arithmetical rays of the (1, −3)-projection.
where (x, y) ∈ [0, 1] × [0, 1]. The first six masks for the paired functions are
shown in Figure 3.59 and 3.60.
The components of the 2-D paired transform with the triplet-numbers
(1, 5, t) are calculated as follows:
0
f1,5,0 =−v4 + v0 − v−4 + v−8 − v−12 + v−16 − v−20
=(v0 + v−8 + v−16 ) − (v4 + v−4 + v−12 + v−20 ),
0
f1,5,1 =−v5 + v1 − v−3 + v−7 − v−11 + v−15 − v−19
=(v1 + v−7 + v−15 ) − (v5 + v−3 + v−11 + v−19 ),
0 (3.75)
f1,5,2 =−v6 + v2 − v−2 + v−6 − v−10 + v−14 − v−18
=(v2 + v−6 + v−14 ) − (v6 + v−2 + v−10 + v−18 ),
0
f1,5,3 =−v7 + v3 − v−1 + v−5 − v−9 + v−13 − v−17 + v−21
=(v3 + v−5 + v−13 + v−21 ) − (v7 + v−1 + v−9 + v−17 ),
where the sums of the discrete image along the rays are denoted by vt =
v1,−3 (t), t = 7 : −1 : −21. For the components of the 2-D paired transform
Image Processing 177
0
l(7)
0.25 l(6)
1
l(5)
l(4)
0.25 l(3)
2
l(2)
l(1)
0.375 l(0)
3
l(−1)
l(−2)
y and m
0.5 l(−3)
4
l(−4)
l(−5)
0.625 l(−6)
5
l(−7)
l(−8)
0.75 l(−9)
6
l(−10)
l(−11)
0.875 l(−12)
7
l(−13)
l(−14)
1 l(−15)
l(−21) l(−20) l(−19) l(−18) l(−17) l(−16)
0 1 2 3 4 5 6 7
FIGURE 3.58
The set of arithmetical rays for the (1, −3)-projection.
with the remaining numbers of the subset U (1, 5), we have the following:
0
f2,2,0 =−v6 + v4 − v2 + v0 − v−2 + v−4 − v−6 + v−8 −
−v−10 + v−12 − v−14 + v−16 − v−18 + v−20
=(v0 + v−8 + v−16 ) + (v4 + v−4 + v−12 + v−20 )−
−(v2 + v−6 + v−14 ) − (v6 + v−2 + v−10 + v−18 ),
0
f2,2,2 =−v7 + v5 − v3 + v1 − v−1 + v−3 − v−5 + v−7
−v−9 + v−11 − v−13 + v−15 − v−17 + v−19 − v−21
=(v1 + v−7 + v−15 ) + (v5 + v−3 + v−11 + v−19 )−
−(v3 + v−5 + v−13 + v−21 ) − (v7 + v−1 + v−9 + v−17 ),
0
f4,4,0 =−v7 + v6 − v5 + v4 − v3 + v2 − v1 + v0 −
−v−1 + v−2 − v−3 + v−4 − v−5 + ... + v−20 − v21
=(v0 + v−8 + v−16 ) + (v4 + v−4 + v−12 + v−20 )−
−(v1 + v−7 + v−15 ) − (v5 + v−3 + v−11 + v−19 )+
+(v2 + v−6 + v−14 ) + (v6 + v−2 + v−10 + v−18 )−
−(v3 + v−5 + v−13 − v−21 ) − (v7 + v−1 + v−9 + v−17 ),
0
f0,0,0 =v0 + v1 + v2 + v3 + · · · + v7 + v−1 + v−2 + v−3 +
+v−4 + v−5 + ... + v−20 + v21 .
178 CHAPTER 3: Image Reconstruction
0
l(4) 0
l(5)
0 0
0.25 0.25
1 1 l(5)
0.25
l(4) 0.25
2 2 l(1)
0.375 l(0) 0.375
y and m
y and m
3 3
0.5 0.5 l(−3)
4 l(−4) 4
0.625 0.625
5 5 l(−7)
0.75
l(−8) 0.75
6 6 l(−11)
0.875 l(−12) 0.875
7 7
1 l(−20) 5 6 l(−16) 1 l(−19) 6 7 l(−15)
0 1 2 0 1 2 3
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
0
l(6) 0
l(7)
0 0 l(7)
0.25 l(6) 0.25
1 1
0.25 0.25 l(3)
2 l(2) 2
0.375 0.375
y and m
3 y and m 3 l(−1)
0.5
l(−2) 0.5
4 4 l(−5)
0.625 l(−6) 0.625
5 5
0.75 0.75 l(−9)
6 l(−10) 6
0.875 0.875
7 7 l(−13)
1
l(−14) 1
0 1 2 3 4 l(−18) 7 0 1 l(−21) 4 5 l(−17)
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.59
Four masks [χ01,5,k ], k = 0 : 3, with the arithmetical rays l1,−3 (t).
y and m
3 3
l(−2)
0.5 0.5 l(−3)
4 l(−4) 4
l(−5)
0.625 l(−6) 0.625
5 5 l(−7)
l(−8)
0.75 0.75 l(−9)
6 l(−10) 6
l(−11)
0.875 l(−12) 0.875
7 7 l(−13)
l(−14)
1 1 l(−15)
0 1 2 l(−20) l(−18) l(−16) 0 1 l(−21) l(−19) l(−17)
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n x and n
FIGURE 3.60
Two masks [χ02,2,2k ], k = 0, 1, with the arithmetical rays l1,−3 (t).
0
l(7)
l(6)
0.25 l(5)
1
l(4)
l(3)
0.25 l(2)
2
l(1)
l(0)
0.375 l(−1)
3
l(−2)
l(−3)
y and m
0.5 l(−4)
4
l(−5)
l(−6)
0.625 l(−7)
5
l(−8)
l(−9)
0.75 l(−10)
6
l(−11)
l(−12)
0.875 l(−13)
7
l(−14)
l(−15)
1
l(−21) l(−20) l(−19) l(−18) l(−17) l(−16)
0 1 2
FIGURE 3.61
The set of geometrical rays for the (1, −3)-projection.
Remark 3.5 We can consider the shifted set of the arithmetical rays, l(t) →
l(t − 1), as the set of 29 geometrical rays:
˜ t 1
l(t) = l1,−3 (t − 1) = (x, y); x − 3y = − , t = 7 : −1 : −21.
8 4
Image Processing 181
0.25 l(7)
1
l(6)
l(5)
0.25 l(4)
2
l(3)
l(2)
0.375 l(1)
3
l(0)
l(−1)
y and m
0.5 l(−2)
4
l(−3)
l(−4)
0.625 l(−5)
5
l(−6)
l(−7)
0.75 l(−8)
6
l(−9)
l(−10)
0.875 l(−11)
7
l(−12)
l(−13)
1 l(−14)
l(−21) l(−20) l(−19) l(−18) l(−17) l(−16)
0 1 7 l(−15)
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n
FIGURE 3.62
Another set of geometrical rays for the (1, −3)-projection.
b−21 =w(−21),
b−20 =w(−20) − b−21 ,
(3.82)
b−19 =w(−19) − (b−20 + b−21),
bt =w(t) − (bt−1 + bt−2 ), t = −18, −17, . . ., 6, 7.
When using the numbering of the control points and rays from 0 to
182 CHAPTER 3: Image Reconstruction
28, as suggested in Remark 5.1, the solution of the system in (3.57) can
be written exactly as in the (p, s) = (3, 1) case (see (3.60)). Then, the
system
√ of equations in (3.77) can be described as w̄(t) = w(˜l(t)) =
8 10/3 [v̄(t) + v̄(t + 1) + v̄(t + 2)] , t = 0 : 28, when the coefficients b̄t are
calculated by
b̄28 = w̄(28),
b̄27 = w̄(27) − b̄28 ,
b̄26 = w̄(26) − (b̄27 + b̄28 ),
b̄t = w̄(t) − (b̄t+1 + b̄t+2 ), t = 25, 24, . . ., 1, 0.
Remark 3.6 Since χ01,5,t = (−1)t χ05,1,t, for t = 0 : 3, we can consider the
(−3, 1)-projection for calculating the components of the 2-D paired transform
of the image, whose triplet-numbers are from the subset U (1, 5), or U (5, 1).
Four masks with the first four triplet-numbers (5, 1, t) are
2 3 2 3
1 0 0 0 −1 0 0 0 0 −1 0 0 0 1 0 0
6 0 0 0 1 0 0 0 −1 7 6 1 0 0 0 −1 0 0 0 7
6 7 6 7
6 0 0 −1 0 0 0 1 0 7 6 0 0 0 1 0 0 0−1 7
6 7 6 7
6 0 1 0 0 0 −1 0 0 7
7, [χ05,1,1 ] =6 0 0 −1 0 0 0 1 0 7
6 7
[χ05,1,0 ] =6
6 −1 0 0 0 1 0 0 0 7 6 0 1 0 0 0 −1 0 0 7
6 7 6 7
6 0 0 0 −1 0 0 0 1 7 6 −1 0 0 0 1 0 0 0 7
6 7 6 7
4 0 0 1 0 0 0 −1 0 5 4 0 0 0 −1 0 0 0 1 5
0 −1 0 0 0 1 0 0 0 0 1 0 0 0 −1 0
2 3 2 3
0 0 1 0 0 0 −1 0 0 0 0 −1 0 0 0 1
6 0 −1 0 0 0 1 0 0 7 6 0 0 1 0 0 0 −1 0 7
6 7 6 7
6 1 0 0 0 −1 0 0 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 0 0 1 0 0 0 −1 7
7, [χ05,1,3 ] =6 1 0 0 0 −1 0 0 0 7
6 7
[χ05,1,2 ] =6
6 0 0 −1 0 0 0 1 0 7 6 0 0 0 1 0 0 0 −1 7
6 7 6 7
6 0 1 0 0 0 −1 0 0 7 6 0 0 −1 0 0 0 1 0 7
6 7 6 7
4 −1 0 0 0 1 0 0 0 5 4 0 1 0 0 0 −1 0 0 5
0 0 0 −1 0 0 0 1 −1 0 0 0 1 0 0 0
In each of these masks, three 1’s are underlined, to show the direction of the
rays l−3,1 (t). The set of 29 geometrical rays for this projection is described as
t 1
l(t) = l−3,1 (t) = (x, y); −3x + y = − , t = 7 : −1 : −21.
8 8
For this set of rays, we consider the following set of control points:
20
• −3 • −6 • −9 • −12 • −15 • −18 • −21 •
3
6 1 −2 −5 −8 −11 −14 −17 −20 7
6 2 • −1 • −4 • −7 • −10 • −13 • −16 • −19 • 7
6 • • • • • • • •7
63 7
6 • . . . . . . .7
64
6 • . . .
7 (angle of rays is tan−1 (3) = 71.565◦ ).
65 . . . .77
6 • . . . . . . .7
66 7
4 • . . . . . . .5
7
• . . . . . . .
Image Processing 183
It is clear that the diagram of these control points is similar to the dia-
gram of the control points considered above for the (1, −3)-projection. Namely,
these two diagrams are equivalent up to operation of the matrix transposition.
Therefore, our future calculations are similar to the (1, −3) case.
The complete system of linear equations for calculating the components of
the 2-D paired transform with triplet-numbers of the subset U (5, 1), or U (1, 5)
can be written as follows:
0 0
f5,1,0 = f1,5,0 =a0 − a4
0 0
f5,1,1 = −f1,5,1 =a1 − a5
0 0
f5,1,2 = f1,5,2 =a2 − a6
0 0
f5,1,3 = −f1,5,3 =a3 − a7
0 (3.83)
f2,2,0 =(a0 + a4 ) − (a2 + a6 )
0
f2,2,2 =(a1 + a5 ) − (a3 + a7 )
0
f4,4,0 =(a0 + a4 ) − (a1 + a5 ) + (a2 + a6 ) − (a3 + a7 )
0
f0,0,0 =(a0 + a4 ) + (a1 + a5 ) + (a2 + a6 ) + (a3 + a7 )
As in the (1, 3)-projection case, the set of 29 geometrical rays can be defined
as the shifted set of the arithmetical rays, l(t) → l(t + 1),
˜ t
l(t) = l−3,1 (t + 1) = (x, y); −3x + y = , t = 7 : −1 : −21,
8
which are shown in Figure 3.65. We obtain the following system of equations
for the line-integrals:
√
w(t) = w(˜l(t)) = 8 10/3 [v(t) + v(t + 1) + v(t + 2)] ,
(3.84)
t = 7 : −1 : −21,
184 CHAPTER 3: Image Reconstruction
l(2)
0.25
l(3)
0.25
l(4)
0.375
l(5)
y and m
0.5
l(6)
0.625
l(7)
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.63
The set of arithmetical rays for the (−3, 1)-projection.
b7 =w(7),
b6 =w(6) − b7 ,
(3.85)
b5 =w(5) − (b6 + b7 ),
bt =w(t) − (bt+1 + bt+2 ), t = 4, 3, . . ., −20, −21.
We now consider another set of control points for the (−3, 1)-projection,
. . . . . . . 0•
. . . . . . . 1•
. . . . . . . 2•
. . . . . . . 3• −1 1 ◦
. . . . . . . 4 • (angle of rays is tan ( 3 = 18.435 ).
26 23 20 17 14 11 8 5
• • • • • • • •
27 24 21 18 15 12 9 6
• • • • • • • •
28 25 22 19 16 13 10 7
• • • • • • • •
Image Processing 185
l(0) l(−4) l(−8) l(−12) l(−16) l(−20)
0
0.25
0.25
l(4)
0.375
3
y and m
0.5
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.64
The mask [χ05,1,0] with the rays of the (−3, 1)-projection.
The set of 29 parallel rays with these control points is shown in Figure 3.66,
after shifting them to the right, t → t − 1, to compose the geometrical rays.
The components of the paired transform with the triplet-numbers (5, 1, t)
are calculated as follows:
0
f5,1,3 = v0 − v4 + v8 − v12 + v16 − v20 + v24 − v28
= (v0 + v8 + v16 + v24 ) − (v4 + v12 + v20 + v28 ),
0
f5,1,0 = −v1 + v5 − v9 + v13 − v17 + v21 − v25
= −(v1 + v9 + v17 + v25 ) + (v5 + v13 + v21 ),
0 (3.86)
f5,1,1 = −v2 + v6 − v10 + v14 − v18 + v22 − v26
= −(v2 + v10 + v18 + v26 ) + (v6 + v14 + v22 ),
0
f5,1,2 = −v3 + v7 − v11 + v15 − v19 + v23 − v27
= −(v3 + v11 + v19 + v27 ) + (v7 + v15 + v23 ),
where the sums of the discrete image along the rays are denoted by vt , t = 0 :
28. Introducing new variables
X X
an = vn+8m = v−3,1,n+8m, n = 0 : 7,
m m
0
we can write the complete system of linear equations (3.86) as f5,1,0 = −a1 +
0 0 0
a5 , f5,1,1 = −a2 + a6 , f5,1,2 = −a3 + a7 , and f5,1,3 = a0 − a4 .
186 CHAPTER 3: Image Reconstruction
l(1)
0.25
l(2)
0.25
l(3)
0.375
l(4)
y and m
0.5
l(5)
0.625
l(6)
0.75
l(7)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.65
The set of geometrical rays for the (−3, 1)-projection.
l(23) l(22) l(20) l(18) l(16) l(14) l(12) l(10) l(8) l(6) l(4) l(2) l(0)
0
l(24)
0.25
l(25)
0.25
l(26)
0.375
l(27)
y and m
0.5
l(28)
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.66
The set of geometrical rays for the (−3, 1)-projection.
This set of geometrical rays corresponds to the case considered above (see
188 CHAPTER 3: Image Reconstruction
l(3)
0.25
l(4)
0.25
l(5)
0.375
l(6)
y and m
0.5
l(7)
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.67
The set of geometrical rays for the (−3, 1)-projection.
The masks of the 2-D paired functions with the first six triplet-numbers
of the subset U (1, 6) are
1 0 0 0 −1 0 0 0
0 0 1 0 0 0 −1 0 0 1 0 00 −1 0 0
0 0 0 10 0 0 −1
−1 0 0 0 1 0 0 0
0 −1 0 00 1 0 0
−1 0 0 0 1 0 0 0
, [χ0 ] = 0 0 0 −1 0 0 0 1 ,
[χ01,6,0] =
0 0 −1 0 0 0 1 0 1,6,1 0 1 0 00 −1 0 0
1 0 0 0 −1 0 0 0
0 0 0 10 0 0 −1
0 0 1 0 0 0 −1 0
0 −1 0 00 1 0 0
−1 0 0 0 1 0 0 0
0 0 0 −1 0 0 0 1
0 0 −1 0 0 0 1 0
0 0 1 0 0 0 −1 0 0 0 0 10 0 0 −1
−1 0 0 0 1 0 0 0 0 −1 0 00 1 0 0
0 0 −1 0 0 0 1 0 0 0 0 −1 0 0 0 1
0
1 0 0 0 −1 0 0 0 0
0 1 0 00 −1 0 0
[χ1,6,2] = , [χ1,6,3] = ,
0 0 1 0 0 0 −1 0 0 0 0 10 0 0 −1
−1 0 0 0 1 0 0 0 0 −1 0 00 1 0 0
0 0 −1 0 0 0 1 0 0 0 0 −1 0 0 0 1
1 0 0 0 −1 0 0 0 0 1 0 00 −1 0 0
1 0 −1 0 1 0 −1 0 0 1 0 −1 0 1 0 −1
−1 0 1 0 −1 0 1 0 0 −1 0 10 −1 0 1
1 0 −1 0 1 0 −1 0 0 1 0 −1 0 1 0 −1
−1 0 1 0 −1 0 1 0 0 −1 0 10 −1 0 1
[χ02,4,0] =
1 0 −1 0 1 0 −1 0 ,
[χ02,4,2] =
0 1 0 −1 0 1 0 −1 .
−1 0 1 0 −1 0 1 0 0 −1 0 10 −1 0 1
1 0 −1 0 1 0 −1 0 0 1 0 −1 0 1 0 −1
−1 0 1 0 −1 0 1 0 0 −1 0 10 −1 0 1
l(0) l(4)
0
0 l(8)
0.25
l(12)
1
l(16)
0.25
2 l(20)
0.375
l(24)
3
y and m
l(28)
0.5
4 l(32)
0.625
l(36)
5
l(40)
0.75
6 l(44)
0.875 l(48)
1
0 1 2 3 4 5 6 7
FIGURE 3.68
The mask [χ01,6,0] with the set of 13 parallel arithmetical rays.
figure, and 5 rays of the (1, −2)-projection are shown in the second figure.
The set of all 22 rays for this projection is shown in Figure 3.70, and it is
described by the following system of equations:
t 1
l(t) = l1,−2 (t) = (x, y); x − 2y = − , t = 7 : −1 : −14, (3.91)
8 16
where (x, y) ∈ [0, 1] × [0, 1],
The control points of this set of parallel rays are given below
0
• 1• 2 • 3• 4 • 5• 6 • 7•
−2 • −1 • . . . . . .
−4 −3
−6 • −5 • . . . . . .
• • . . . . . . (angle of rays is tan−1 ( 1 ) = 26.5651◦).
−8 −7
•
−10 −9 • . . . . . .
2
•
−12 −11 • . . . . . .
• • . . . . . .
−14 −13
• • . . . . . .
The first six masks for the paired functions which are defined by the (1, 6)-
projection are shown in Figures 3.71 and 3.72.
Image Processing 191
l(4)
0
0.25
0.25
l(4)
2
0.375
3
y and m
0.5
l(0)
4
0.625
0.75
l(−4)
6
0.875
1
l(−12) l(−8)
0 1 2 3 5 6 7
FIGURE 3.69
The mask [χ01,6,0] with the set of 5 parallel arithmetical rays.
where the sums of the discrete image along the rays are denoted by vt =
v1,−2 (t), t = 7 : −1 : −14. For the remaining two components with the triplet-
192 CHAPTER 3: Image Reconstruction
0
l(7)
0.25
l(6)
1
l(5)
0.25
l(4)
2
l(3)
0.375
l(2)
3
y and m
l(1)
0.5
l(0)
4
l(−1)
0.625
l(−2)
5
l(−3)
0.75
l(−4)
6
l(−5)
0.875
l(−6)
7
l(−7)
1
l(−14) l(−13) l(−12) l(−11) l(−10) l(−9) l(−8)
0 1
FIGURE 3.70
The set of arithmetical rays for the (1, −2)-projection.
the complete system of linear equations, for calculating the eight components
of the 2-D paired transform with triplet-numbers of the subset U (1, 6), can be
Image Processing 193
0
l(0) l(4) 0
l(1) l(5)
0 0
0.25 0.25
1 1
0.25 0.25 l(5)
2 l(4) 2
0.375 0.375
y and m
y and m
3 3
0.5 0.5 l(1)
4 l(0) 4
0.625 0.625
5 5 l(−3)
0.75 l(−4) 0.75
6 6
0.875 0.875
7 7 l(−7)
1 1
0 1 2 l(−12) 6 7 l(−8) 0 1 2 3 l(−11) 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
0
l(2) l(6) 0
l(3) l(7)
0 0
0.25 0.25 l(7)
1 l(6) 1
0.25 0.25
2 2
0.375 0.375 l(3)
y and m
3 l(2) y and m 3
0.5 0.5
4 4 l(−1)
0.625 l(−2) 0.625
5 5
0.75 0.75
6 6 l(−5)
0.875 l(−6) 0.875
7 7
1 1
0 1 l(−14) 4 l(−10) 0 1 2 l(−13) 5 l(−9)
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.71
Masks [χ01,6,k ], k = 0 : 3, with the arithmetical rays l1,−2 (t), t = 7 : −1 : 14.
written as follows:
0
f1,6,0 =a0 − a4
0
f1,6,1 =a1 − a5
0
f1,6,2 =a2 − a6
0
f1,6,3 =a3 − a7
0 (3.93)
f2,4,0 =(a0 + a4 ) − (a2 + a6 )
0
f2,4,2 =(a1 + a5 ) − (a3 + a7 )
0
f4,0,0 =(a0 + a4 ) − (a1 + a5 ) + (a2 + a6 ) − (a3 + a7 )
0
f0,0,0 =(a0 + a4 ) + (a1 + a5 ) + (a2 + a6 ) + (a3 + a7 ).
As in the case of the (1, 2)-projection, two sets of geometrical rays can be
194 CHAPTER 3: Image Reconstruction
y and m
3 3
l(−2)
0.5 0.5 l(−3)
4 l(−4) 4
l(−5)
0.625 l(−6) 0.625
5 5 l(−7)
l(−8)
0.75 0.75 l(−9)
6 l(−10) 6
l(−11)
0.875 l(−12) 0.875
7 7 l(−13)
l(−14)
1 1 l(−15)
0 1 2 l(−20) l(−18) l(−16) 0 1 l(−21) l(−19) l(−17)
0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1 0 0.125 0.25 0.375 0.5 0.625 0.75 0.875 1
x and n x and n
FIGURE 3.72
Two masks [χ02,4,2k ], k = 0, 1, with the arithmetical rays l1,−2 (t).
and is shown in Figure 3.73. For this set of geometrical rays, we obtain the
following system of equations for the line-integrals:
√
w(t) = w(˜
l(t)) = 4 5 [v(t) + v(t + 1)] , t = 7 : −1 : −14, (3.94)
b7 =w(7),
b6 =w(6) − b7 , (3.95)
bt =w(t) − bt+1 , t = 5, 4, . . . , 0, 1, −1, −2, ..., −14.
The second set is defined by shifting the set of the arithmetical rays by
l(t) → l(t − 0.5),
t 1
l̃(t) = l1,−2 (t − 0.5) = (x, y); x − 2y = − , t = 7 : −1 : −14,
8 8
which is given in Figure 3.74. The system of equations for the line-integrals is
defined as
√
w(t) = w(˜l(t)) = 4 5 [v(t) + v(t − 1)] , t = 7 : −1 : −14, (3.96)
Image Processing 195
0 l(7)
0.25 l(6)
1 l(5)
0.25 l(4)
2 l(3)
0.375 l(2)
3 l(1)
y and m
0.5 l(0)
4 l(−1)
0.625 l(−2)
5 l(−3)
0.75 l(−4)
6 l(−5)
0.875 l(−6)
7 l(−7)
1 l(−8)
l(−14) l(−13) l(−12) l(−11) l(−10) l(−9)
0 1
FIGURE 3.73
The set of 22 geometrical rays for the (1, −2)-projection.
where v(−15) = 0. The required √ sums v(t) of the discrete image fn,m are
therefore defined as v(t) = bt /(4 5), where the components bt are calculated
recursively by
b−14 =w(−14),
b−13 =w(−13) − b−14 , (3.97)
bt =w(t) − bt−1 , t = −12, −11, . . . , 0, 1, ..., 7.
It should also be noted that the numbering of the control points can be
changed, as well as the numbering of all line-integrals w(t) and sums vt = v(t)
by the transformation t → 7 − t, where t = 7 : −1 : −21,
7 6 5 4 3 2 1 0
• • • • • • • •
9• 8• . . . . . .
11 10
• • . . . . . .
13 12
• • . . . . . .
• • . . . . . . .
15 14
17 16
• • . . . . . .
19 18
• • . . . . . .
21 20
• • . . . . . .
196 CHAPTER 3: Image Reconstruction
0.25 l(7)
1 l(6)
0.25 l(5)
2 l(4)
0.375 l(3)
3 l(2)
y and m
0.5 l(1)
4 l(0)
0.625 l(−1)
5 l(−2)
0.75 l(−3)
6 l(−4)
0.875 l(−5)
7 l(−6)
1 l(−7)
l(−14) l(−13) l(−12) l(−11) l(−10) l(−9) l(−8)
0
FIGURE 3.74
The second set of 22 geometrical rays for the (1, −2)-projection.
The masks of the 2-D paired functions with first six triplet-numbers of the
subset U (6, 1) are
2 3 2 3
1 0 −1 0 1 0 −1 0 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 07 6 1 0 −1 0 1 0 −1 0 7
6 7 6 7
6 0 1 0 −1 0 1 0 −1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
7, [χ06,1,1 ] =6 0 1 0 −1 0 1 0 −1 7
6 0 0 0 0 0 0 0 07 6 7
[χ06,1,0 ] =6
6 −1 0 1 0 −1 0 1 0 7 6 0 0 0 0 0 0 0 07
6 7 6 7
6 0 0 0 0 0 0 0 07 6 −1 0 1 0 −1 0 1 0 7
6 7 6 7
4 0 −1 0 1 0 −1 0 1 5 4 0 0 0 0 0 0 0 05
0 0 0 0 0 0 0 0 0 −1 0 1 0 −1 0 1
Image Processing 197
2 3 2 3
0 −1 0 1 0 −1 0 1 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 07 6 0 −1 0 1 0 −1 0 1 7
6 7 6 7
6 1 0 −1 0 1 0 −1 0 7 6 0 0 0 0 0 0 0 07
6 7 6 7
7, [χ06,1,3 ] =6 1 0 −1 0 1 0 −1 0 7
6 0 0 0 0 0 0 0 07 6 7
[χ06,1,2 ] =6
6 0 1 0 −1 0 1 0 −1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
6 0 0 0 0 0 0 0 07 6 0 1 0 −1 0 1 0 −1 7
6 7 6 7
4 −1 0 1 0 −1 0 1 0 5 4 0 0 0 0 0 0 0 05
0 0 0 0 0 0 0 0 −1 0 1 0 −1 0 1 0
2 3 2 3
1 −1 1 −1 1 −1 1 −1 0 0 0 0 0 0 0 0
6 0 0 0 0 0 0 0 07 6 1 −1 1 −1 1 −1 1 −1 7
6 7 6 7
6 −1 1 −1 1 −1 1 −1 1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
7, [χ04,2,2 ] =6 −1 1 −1 1 −1 1 −1 1 7.
6 0 0 0 0 0 0 0 07 6 7
[χ04,2,0 ] =6
6 1 −1 1 −1 1 −1 1 −1 7 6 0 0 0 0 0 0 0 07
6 7 6 7
6 0 0 0 0 0 0 0 07 6 1 −1 1 −1 1 −1 1 −1 7
6 7 6 7
4 −1 1 −1 1 −1 1 −1 1 5 4 0 0 0 0 0 0 0 05
0 0 0 0 0 0 0 0 −1 1 −1 1 −1 1 −1 1
Instead of parallel rays of the (6, 1)-projection, we consider the (−2, 1)-
projection which defines the same set of masks of the paired functions. Indeed,
the equation 6n + m = t mod 8 can be written as (8 − 2)n + m = −2n + m =
t mod 8. The change of the projection allows for reducing the number of rays
from 50 to 22. The set of all parallel rays for this projection is shown in
Figure 3.75.
The control points of this set of rays are given below
0 −2 −4 −6 −8 −10 −12 −14
• • • • • • • •
1 • −1 • −3 • −5 • −7 • −9 • −11 • −13 •
2
• . . . . . . .
3
• . . . . . . .
4 (angle of rays is tan−1 (2) = 63.435◦)
• . . . . . . .
5
• . . . . . . .
6
• . . . . . . .
7
• . . . . . . .
where (x, y) ∈ [0, 1]×[0, 1]. The masks with parallel rays for the first six paired
functions are shown in Figures 3.76 and 3.77.
The components of the 2-D paired transform with the triplet-numbers of
198 CHAPTER 3: Image Reconstruction
0.25 l(2)
0.25 l(3)
0.375 l(4)
3
y and m
0.5 l(5)
0.625 l(6)
0.75 l(7)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.75
The set of arithmetical rays for the (−2, 1)-projection.
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 1 l(4) 3 l(0) 5 6 7 0 l(5) l(1) 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 l(6) 2 l(2) 4 5 6 7 0 l(7) l(3) 4 5 6 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.76
Four masks [χ06,1,k ], k = 0 : 3, with the arithmetical rays l−2,1 (t).
l(−2) l(−4) l(−6) l(−8) l(−10)l(−12) l(−14) l(−1) l(−3) l(−5) l(−7) l(−9) l(−11) l(−13)
0 0
0 0
0.25 0.25
1 1
0.25 0.25
2 2
0.375 0.375
y and m
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 l(6) l(4) l(2) l(0) 5 6 7 0 l(7) l(5) l(3) l(1) 5 6 7
0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1 0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1
x and n x and n
FIGURE 3.77
Two masks [χ04,2,2k ], k = 0, 1, with the arithmetical rays l−2,1 (t).
200 CHAPTER 3: Image Reconstruction
the complete system of linear equations, for calculating the eight components
of the 2-D paired transform with triplets of the subset U (6, 1), can be written
as follows:
0
f6,1,0 =a0 − a4
0
f6,1,1 =a1 − a5
0
f6,1,2 =a2 − a6
0
f6,1,3 =a3 − a7
0 (3.100)
f4,2,0 =(a0 + a4 ) − (a2 + a6 )
0
f4,2,2 =(a1 + a5 ) − (a3 + a7 )
0
f0,4,0 =(a0 + a4 ) − (a1 + a5 ) + (a2 + a6 ) − (a3 + a7 )
0
f0,0,0 =(a0 + a4 ) + (a1 + a5 ) + (a2 + a6 ) + (a3 + a7 ).
Two sets of geometrical rays can be used to determine the sums of the
image along the arithmetical rays. The first set is defined by shifting the set
of arithmetical rays by l(t) → l(t + 0.5). This set of 22 rays is described by
˜ t
l(t) = l−2,1 (t + 0.5) = (x, y); −2x + y = , t = 7 : −1 : −14,
8
and is shown in Figure 3.78. The line-integrals along this set of geometrical
rays can be written as
√
w(t) = w(˜l(t)) = 4 5 [v(t) + v(t + 1)] , t = 7 : −1 : −14, (3.101)
where v(8) = 0.√The required sums v(t) of the image fn,m are therefore defined
as v(t) = bt /(4 5), where the components bt are calculated recursively by
b7 = w(7),
b6 = w(6) − b7 , (3.102)
bt = w(t) − bt+1 , t = 5, 4, . . . , 0, 1, −1, −2, ..., −14.
The second set of geometrical rays is defined by shifting the set of the
arithmetical rays by l(t) → l(t − 0.5),
t 1
l̃(t) = l−2,1 (t − 0.5) = (x, y); −2x + y = − , t = 7 : −1 : −14,
8 8
which is given in Figure 3.79. In this case, the system of equations for the
Image Processing 201
l(1)
0.25
l(2)
0.25
l(3)
0.375
l(4)
y and m
0.5
l(5)
0.625
l(6)
0.75
l(7)
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.78
The set of geometrical rays for the (−2, 1)-projection.
line-integrals is described by
√
w(t) = w(˜ l(t)) = 4 5 [v(t) + v(t − 1)] , t = 7 : −1 : −14, (3.103)
where v(−15) = 0. The required √ sums v(t) of the discrete image fn,m are
therefore defined as v(t) = bt /(4 5), where the components bt are calculated
recursively by
b−14 =w(−14),
b−13 =w(−13) − b−14 , (3.104)
bt =w(t) − bt−1 , t = −12, −11, . . . , 0, 1, ..., 7.
It should be noted that the numbering of the control points can be changed,
as well as the numbering of all line-integrals w(t) and sums vt = v(t) by the
202 CHAPTER 3: Image Reconstruction
l(2)
0.25
l(3)
0.25
l(4)
0.375
l(5)
y and m
0.5
l(6)
0.625
l(7)
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.79
The second set of geometrical rays for the (−2, 1)-projection.
We consider masks of the 2-D paired functions with the first six triplet-
numbers of the subset U (1, 7),
2 3 2 3
1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0 0
6 0 1 0 0 0 −1 0 0 7 6 0 0 1 0 0 0 −1 0 7
6 7 6 7
6 0 0 1 0 0 0 −1 0 7 6 0 0 0 1 0 0 0−1 7
6 7 6 7
7, [χ01,7,1 ] =6 −1 0 0 0 1 0 0 0 7
6 0 0 0 1 0 0 0−1 7 6 7
[χ01,7,0 ] =6
6 −1 0 0 0 1 0 0 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 −1 0 0 0 1 0 0 7 6 0 0 −1 0 0 0 1 0 7
6 7 6 7
4 0 0 −1 0 0 0 1 0 5 4 0 0 0 −1 0 0 0 1 5
0 0 0 −1 0 0 0 1 1 0 0 0 −1 0 0 0
2 3 2 3
0 0 1 0 0 0 −1 0 0 0 0 1 0 0 0−1
6 0 0 0 1 0 0 0−1 7 6 −1 0 0 0 1 0 0 0 7
6 7 6 7
6 −1 0 0 0 1 0 0 0 7 6 0 −1 0 0 0 1 0 0 7
6 7 6 7
6 0 −1 0 0 0 1 0 0 7
7, [χ01,7,3 ] =6 0 0 −1 0 0 0 1 0 7
6 7
[χ01,7,2 ] =6
6 0 0 −1 0 0 0 1 0 7 6 0 0 0 −1 0 0 0 1 7
6 7 6 7
6 0 0 0 −1 0 0 0 1 7 6 1 0 0 0 −1 0 0 0 7
6 7 6 7
4 1 0 0 0 −1 0 0 0 5 4 0 1 0 0 0 −1 0 0 5
0 1 0 0 0 −1 0 0 0 0 1 0 0 0 −1 0
2 3 2 3
1 0 −1 0 1 0 −1 0 0 1 0 −1 0 1 0 −1
6 0 1 0 −1 0 1 0 −1 7 6 −1 0 1 0 −1 0 1 0 7
6 7 6 7
6 −1 0 1 0 −1 0 1 0 7 6 0 −1 0 1 0 −1 0 1 7
6 7 6 7
6 0 −1 0 1 0 −1 0 1 7
7, [χ02,6,2 ] =6 1 0 −1 0 1 0 −1 0 7
6 7
[χ02,6,0 ] =6
6 1 0 −1 0 1 0 −1 0 7 6 0 1 0 −1 0 1 0 −1 7
6 7 6 7
6 0 1 0 −1 0 1 0 −1 7 6 −1 0 1 0 −1 0 1 0 7
6 7 6 7
4 −1 0 1 0 −1 0 1 0 5 4 0 −1 0 1 0 −1 0 1 5
0 −1 0 1 0 −1 0 1 1 0 −1 0 1 0 −1 0
Instead of the parallel rays of the (1, 7)-projection, we consider the (1, −1)-
projection which defines the same set of masks of paired functions. This change
allows for reducing the number of rays from (1+7)7+1 = 57 to (1+1)7+1 = 15.
As an example, Figures 3.80 and 3.81 show the same mask of the paired
function χ01,7,0 with the parallel arithmetical rays of two different projections.
Fifteen rays of the (1, 7)-projection are shown in the first figure, and three
rays of the (1, −1)-projection are shown in the second figure.
The set of the 15 geometrical rays of this projection is described by
t
l(t) = l1,−1 (t) = (x, y); x − y = , t = 7 : −1 : −7, (3.105)
8
where (x, y) ∈ [0, 1] × [0, 1]. This set is shown in Figure 3.82. The control
204 CHAPTER 3: Image Reconstruction
l(0) l(4)
0
l(8)
0
l(12)
0.25
1 l(16)
0.25 l(20)
2 l(24)
0.375
l(28)
3
l(32)
y and m
0.5
l(36)
4
l(40)
0.625
5 l(44)
0.75 l(48)
6 l(52)
0.875
l(56)
7
1
0 1 2 3 4 5 6 7
FIGURE 3.80
The mask [χ01,7,0] with 15 arithmetical rays of the (1, 7)-projection.
The first six masks for the paired functions with the triplet-numbers of
U (1, 7) are shown in Figures 3.83 and 3.84.
The components of the 2-D paired transform with the triplet-numbers
Image Processing 205
l(4)
0
0.25
0.25
0.375
3
y and m
0.5
l(4)
4
0.625
0.75
0.875
1 l(0)
l(−4)
0 1 2 3 5 6 7
FIGURE 3.81
The mask [χ01,7,0] with 3 arithmetical rays of the (1, −1)-projection.
where the sums of the discrete image along the rays are denoted by vt =
v1,−1 (t), t = 7 : −1 : −7. For the remaining two components of the 2-D paired
transform, which have the triplet-numbers (4, 4, 0) and (0, 0, 0), we have the
following:
0
f4,4,0 =(v0 ) + (v4 + v−4 ) − (v1 + v−7 ) − (v5 + v−3 )+
+(v2 + v−6 ) + (v6 + v−2 ) − (v3 + v−5 ) − (v7 + v−1 ),
0
f0,0,0 =v0 + v1 + v2 + v3 + · · · + v7 + v−1 + v−2 + ... + v−6 + v−7 .
206 CHAPTER 3: Image Reconstruction
0.25
l(7)
1
0.25
l(6)
2
0.375
l(5)
3
y and m
0.5
l(4)
4
0.625
l(3)
5
0.75
l(2)
6
0.875
l(1)
7
1
l(−7) l(−6) l(−5) l(−4) l(−3) l(−2) l(−1) l(0)
0
FIGURE 3.82
The set of arithmetical rays for the (1, −1)-projection.
the complete system of linear equations for calculating the eight components
of the 2-D paired transform with triplet-numbers of the subset U (1, 7) can be
written as follows:
0
f1,7,0 =a0 − a4
0
f1,7,1 =a1 − a5
0
f1,7,2 =a2 − a6
0
f1,7,3 =a3 − a7
0 (3.107)
f2,6,0 =(a0 + a4 ) − (a2 + a6 )
0
f2,6,2 =(a1 + a5 ) − (a3 + a7 )
0
f4,4,0 =(a0 + a4 ) − (a1 + a5 ) + (a2 + a6 ) − (a3 + a7 )
0
f0,0,0 =(a0 + a4 ) + (a1 + a5 ) + (a2 + a6 ) + (a3 + a7 ).
These calculations correspond to the 8-point discrete paired transform of the
vector a = (a0 , a1 , a2 , ..., a7)0 ,
0
l(0) l(4) 0
l(1) l(5)
0 0
0.25 0.25
1 1
0.25 0.25
2 2
0.375 0.375 l(5)
y and m
y and m
3 3
0.5 l(4) 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875 l(1)
7 7
1 1
0 1 2 3 l(−4) 6 7 l(0) 0 l(−7)2 3 4 l(−3) 7
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
0
l(2) l(6) 0
l(3) l(7)
0 0
0.25 0.25 l(7)
1 1
0.25 l(6) 0.25
2 2
0.375 0.375
y and m
3
y and m 3
0.5 0.5
4 4
0.625 0.625 l(3)
5 5
0.75 l(2) 0.75
6 6
0.875 0.875
7 7
1 1
0 1 l(−6) 4 5 l(−2) 0 1 2 l(−5) 5 6 l(−1)
0 0.120.250.37 0.5 0.620.750.87 1 0 0.120.250.37 0.5 0.620.750.87 1
x and n x and n
FIGURE 3.83
Four masks [χ01,7,k ], k = 0 : 3, with the arithmetical rays l1,−1 (t).
As in the (p, s) = (1, 1) case of the diagonal projection, the sums v(t) of
the discrete image fn,m can be calculated directly from the line-integrals w(t).
The set of geometrical rays coincides with the set of arithmetical
√ rays.√Each
ray intersects the image element√along the path of length ∆l
√ = 2∆x = 2/8.
Therefore, w(t) = w1,−1 (t) = 8 2v(t), or v(t)
√ = w(t)/(8 2), t = 7 : −1 : −7.
We obtain the following: P(1, 7) = 1/(8 2)[χ08 ]w, where the vector w =
(w7 , w6 , ..., w0, w−1 , ..., w−7)0 .
The numbering of the control points can be changed, as well as the numbe-
ring of all line-integrals w(t) and sums vt = v(t), by using the transformation
208 CHAPTER 3: Image Reconstruction
y and m
3 3
0.5 l(4) 0.5
4 4
0.625 0.625 l(3)
5 5
0.75 l(2) 0.75
6 6
0.875 0.875 l(1)
7 7
1 1
0 1 l(−6) 3 l(−4) 5 l(−2) 7 l(0) 0 l(−7) 2 l(−5) 4 l(−3) 6 l(−1)
0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1 0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1
x and n x and n
FIGURE 3.84
Two masks [χ02,6,2k ], k = 0, 1, with the arithmetical rays l1,−1 (t).
t → 7 − t, where t = 7 : −1 : −7,
7 6 5 4 3 2 1 0
• • • • • • • •
8• . . . . . . .
9
• . . . . . . .
10
• . . . . . . .
11
• . . . . . . .
(angle of rays is tan−1 (1) = 45◦).
12
• . . . . . . .
13
• . . . . . . .
14
• . . . . . . .
TABLE 3.3
Number of geometrical rays and subsets U (p, s) for the 8 × 8 case
(p, s) n triplet-numbers in U (p, s)
(1, 0) 8 (1, 0, 0), (1, 0, 1), (1, 0, 2), (1, 0, 3), (2, 0, 0), (2, 0, 2), (4, 0, 0), (0, 0, 0) 8
(1, 1) 15 (1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 1, 3), (2, 2, 0), (2, 2, 2), (4, 4, 0), (0, 0, 0) 7
(1, 2) 22 (1, 2, 0), (1, 2, 1), (1, 2, 2), (1, 2, 3), (2, 4, 0), (2, 4, 2), (4, 0, 0), (0, 0, 0) 6
(1, 3) 29 (1, 3, 0), (1, 3, 1), (1, 3, 2), (1, 3, 3), (2, 6, 0), (2, 6, 2), (4, 4, 0), (0, 0, 0) 6
(1, 4) 36 (1, 4, 0), (1, 4, 1), (1, 4, 2), (1, 4, 3), (2, 0, 0), (2, 0, 2), (4, 0, 0), (0, 0, 0) 4
(1, 5) 29 (1, 5, 0), (1, 5, 1), (1, 5, 2), (1, 5, 3), (2, 2, 0), (2, 2, 2), (4, 4, 0), (0, 0, 0) 4
(1, 6) 22 (1, 6, 0), (1, 6, 1), (1, 6, 2), (1, 6, 3), (2, 4, 0), (2, 4, 2), (4, 0, 0), (0, 0, 0) 4
(1, 7) 15 (1, 7, 0), (1, 7, 1), (1, 7, 2), (1, 7, 3), (2, 6, 0), (2, 6, 2), (4, 4, 0), (0, 0, 0) 4
(0, 1) 8 (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 1, 3), (0, 2, 0), (0, 2, 2), (0, 4, 0), (0, 0, 0) 7
(2, 1) 22 (2, 1, 0), (2, 1, 1), (2, 1, 2), (2, 1, 3), (4, 2, 0), (4, 2, 2), (0, 4, 0), (0, 0, 0) 6
(4, 1) 36 (4, 1, 0), (4, 1, 1), (4, 1, 2), (4, 1, 3), (0, 2, 0), (0, 2, 2), (0, 4, 0), (0, 0, 0) 4
(6, 1) 22 (6, 1, 0), (6, 1, 1), (6, 1, 2), (6, 1, 3), (4, 2, 0), (4, 2, 2), (0, 4, 0), (0, 0, 0) 4
190 64
0
Then, the components fp,s,t of the 2-D paired transform, which have been
calculated by 1-D paired transform P(p, s) = [χ0N ]a, are normalized by the
factor of 2k = g.c.d.(p, s), when (p, s) 6= (0, 0), and N, when (p, s) = (0, 0).
2. One can use the incomplete complete 1-D paired transforms over vec-
tors a, to avoid the repetition of calculation of components of the 2-D paired
210 CHAPTER 3: Image Reconstruction
transform of the image. The last column in the table shows the number of
outputs to be calculated when performing the incomplete 1-D paired trans-
forms. For instance, the complete 1-D paired transform can be used for the
first (1, 0)-projection, but only six outputs for the transform when calculating
the transform P(1, 2) = [χ08 ]a, for the (1, 2)-projection, and half of calculations
when calculating the transform P(1, 4) = [χ08 ]a, for the (1, 4)-projection, and
so on. The use of incomplete 1-D paired transforms reduces the time necessary
to calculate the reconstructed image, when compared with the first method.
TABLE 3.4
Equations of G-rays on the grid 8 × 8. (The coordinate system is original.)
p+s
(p, s) A-rays t ± t0 G-rays l(t ∓ t0 ) t0 = 2 −1 t
(1, 0) l1,0 (t) t x = t/8 + 1/16 0 0:7
(1, 1) l1,1 (t) t x + y = t/8 + 1/8 0 0 : 14
(1, 2) l1,2 (t) t − 1/2 x + 2y = t/8 + 1/8 1/2 0 : 21
l1,2 (t) t + 1/2 x + 2y = t/8 + 1/4 1/2 21 : −1 : 0
(1, 3) l1,3 (t) t−1 x + 3y = t/8 + 1/8 1 0 : 28
l1,3 (t) t+1 x + 3y = t/8 + 3/8 1 28 : −1 : 0
(1, 4) l1,4 (t) t − 3/2 x + 4y = t/8 + 1/8 3/2 0 : 35
l1,4 (t) t + 3/2 x + 4y = t/8 + 1/2 3/2 35 : −1 : 0
p+N −s
(p, s) A-rays t ± t0 G-rays l(t ∓ t0 ) t0 = 2 −1 t
(1, 5) l1,−3 (t) t−1 x − 3y = t/8 − 1/4 1 7 : −1 : −21
l1,−3 (t) t+1 x − 3y = t/8 1 −21 : 1 : 7
(1, 6) l1,−2 (t) t − 1/2 x − 2y = t/8 − 1/8 1/2 7 : −1 : −14
l1,−2 (t) t + 1/2 x − 2y = t/8 1/2 −14 : 1 : 7
(1, 7) l1,−1 (t) t x − y = t/8 0 7 : −1 : −7
p+s
(p, s) A-rays t ± t0 G-rays l(t ∓ t0 ) t0 = 2 −1 t
(0, 1) l0,1 (t) t y = t/8 + 1/16 0 0:7
(2, 1) l2,1 (t) t − 1/2 2x + y = t/8 + 1/8 1/2 0 : 21
l2,1 (t) t + 1/2 2x + y = t/8 + 1/4 1/2 21 : 0
(4, 1) l4,1 (t) t − 3/2 4x + y = t/8 + 1/8 3/2 0 : 35
l4,1 (t) t + 3/2 4x + y = t/8 + 1/2 3/2 35 : 0
N −p+s
(p, s) A-rays t ± t0 G-rays l(t ∓ t0 ) t0 = 2
−1 t
(6, 1) l−2,1 (t) t − 1/2 −2x + y = t/8 − 1/8 1/2 7 : −1 : −14
l−2,1 (t) t + 1/2 −2x + y = t/8 1/2 −14 : 1 : 7
The set of all generators of JN,N is divided into four subsets, and we consider
each of them separately. The first and second subsets contain all generators
(1, s), where s = 0 : N/2 and s = N/2 + 1 : N − 1, respectively. The third and
fourth subsets contain all generators (p, 1), where p = 2p1 and p1 = 0 : N/4
and p1 = N/4 +1 : N/2 −1, respectively. For each of these subsets we consider
case A which is referred to as the case when the arithmetical rays are shifted
to the right, to define the corresponding geometrical rays. Case B is referred
to as the case when the arithmetical rays are shifted to the left, to define the
corresponding geometrical rays.
Subsets I and III: p = 1 and s ≤ N/2, and s = 1 and p ≤ N/2.
G-rays l̃(t) are defined by the shift
p+s
t → t ∓ t0 , t0 = − 1,
2
of A-rays, i.e.
t ∓ t0 p+s
L̃p,s,t (x, y) = Lp,s,t∓t0 (x, y) = + .
N 2N
Case A:
t − t0 p+s
L̃p,s,t (x, y) =Lp,s,t−t0 (x, y) = +
N 2N
t p+s 1 p+s t 1
= − − + = + .
N 2N N 2N N N
Case B:
t + t0 p+s
L̃p,s,t (x, y)= Lp,s,t+t0 (x, y) = +
N 2N
t p+s 1 p+s t p+s−1
= + − + = + .
N 2N N 2N N N
Thus, if p = 1,
t s
L̃1,s,t (x, y) = L1,s,t+t0 (x, y) = + ,
N N
and if s = 1,
t p
L̃p,1,t (x, y) = Lp,1,t+t0 (x, y) =
+ .
N N
The equation for case A is simple, when compared with case B.
Subset II: p = 1 and s > N/2.
A-rays are considered to be l(t) = l1,s−N (t), which are defined by
t 1 + (s − N )
L1,s−N,t (x, y) = x + y(s − N ) = + .
N 2N
212 CHAPTER 3: Image Reconstruction
The G-rays ˜
l(t) are defined by the shift of A-rays:
1 + (N − s) N −s−1
t → t ∓ t0 , t0 = −1= ,
2 2
t ∓ t0 1 + (s − N )
L̃1,s−N,t (x, y) = L1,s−N,t∓t0 (x, y) = + .
N 2N
Case A:
t − t0 1+s−N
L̃1,s−N,t (x, y)= L1,s−N,t−t0 (x, y) = +
N 2N
t N −s−1 s−N +1 t s+1
= − + = − 1− .
N 2N 2N N N
Case B:
t + t0 1+s−N
L̃1,s−N,t (x, y) =L1,s−N,t+t0 (x, y) = +
N 2N
t N −s−1 s−N +1 t
= + + = .
N 2N 2N N
t (p − N ) + 1
Lp−N,1,t (x, y) = x(p − N ) + y = + .
N 2N
The G-rays ˜
l(t) are defined by the shift
(N − p) + 1 N −p−1
t → t ∓ t0 , t0 = −1=
2 2
of A-rays, i.e.
t ∓ t0 (p − N ) + 1
L̃p−N,1,t (x, y) = Lp−N,1,t∓t0 (x, y) = + .
N 2N
Case A:
t − t0 p−N +1
L̃p−N,1,t (x, y) =Lp−N,1,t−t0 (x, y) = +
N 2N
t N −p−1 p−N +1 t p+1
= − + = − 1− .
N 2N 2N N N
Case B:
t + t0 p−N +1
L̃p−N,1,t (x, y)=Lp−N,1,t+t0 (x, y) = +
N 2N
t N −p−1 p−N +1 t
= + + = .
N 2N 2N N
Image Processing 213
Thus, for subsets II and IV, equations for case B have a simple form and can
therefore be selected for image reconstruction. For subsets I and III, equations
for case A are simple. In both cases A and B, geometrical rays are defined
from the arithmetical rays by shifting ˜l(t) = l(t − t0 ) and ˜l(t) = l(t + t0 ),
respectively. Here the shift t0 is calculated by
p+s
− 1, when 0 < p, s ≤ N/2,
2
p + (N − s)
t0 = − 1, when p = 1, s > N/2, (3.109)
2
(N − p) + s − 1, when p > N/2, s = 1.
2
It should be noted that for each of the subsets of generators (p, s), the use
of only case A, or case B leads to similar systems of equations that describe
the procedure of calculating the sums v(t) from integrals w(t). Indeed, these
equations are described respectively by the upper or lower triangular Toeplitz
matrices. One can use only, for instance, the upper triangular Toeplitz ma-
trices, if only case A will be used for all subsets of generators. It is also not
difficult to notice that the solution of the system described by the low upper
triangular Toeplitz matrix, b = A−1 w, is reduced to the solution of the sys-
tem with the upper triangular Toeplitz matrix, b̃ = Ã−1 w̃, after permutation
t → M − t of rows of the vectors b, w, and the matrix A−1 . Here M × M is
the size of the Toeplitz matrix.
TABLE 3.5
Model I (case A): Convolution equations for the 8 × 8 case
G-rays w = KAv, b = A−1 w v = Bw (v = Bb)
l1,0 (t) w(t) = 8v(t)
√ t = 0 : 7, (K = 8) √ v(t) = w(t)/8 √
l1,1 (t) w(t) = 8√2v(t) t = 0 : 14, (K = 8 2) v(t) = w(t)/(8
√ 2)
l1,2 (t − 0.5) w(t) = 4 5[v(t − 1) + v(t)] v(t) = bt /(4 5)
√ bt = w(t) − bt−1
b0 = w(0), t = 0 : 21 √
l1,3 (t − 1) w(t) = 8 10/3[v(t) + v(t − 1) + v(t − 2)] v(t) = 3bt /(8 10)
√ bt = w(t) − (bt−1 + bt−2 )
b0 = w(0), t = 0 : 28 √
l1,4 (t − 1.5) w(t) = 2 17[v(t) + v(t − 1) + v(t − 2) + v(t − 3)] v(t) = bt /(2 17)
b0 = w(0), bt = w(t) − (bt−1 + bt−2 + bt−3 ) t = 0 : 35
√ √
l1,−3 (t − 1) w(t) = 8 10/3[v(t) + v(t − 1) + v(t − 2)] v(t) = 3bt /(8 10)
b−21 = w(−21),
√ bt = w(t) − (bt−1 + bt−2 ) t = −21 : 7 √
l1,−2 (t − 0.5) w(t) = 4 5[v(t) + v(t − 1))] v(t) = bt /(4 5)
b−14 = w(−14),
√ bt = w(t) − bt−1 t = −14 : 7 √
l1,−1 (t) w(t) = 8 2v(t) v(t) = w(t)/(8 2)
bt = w(t) t = −7 : 7
l0,1 (t) w(t) = 8v(t),
√ t=0:7 v(t) = w(t)/8√
l2,1 (t − 0.5) w(t) = 4 5[v(t) + v(t − 1)] v(t) = bt /(4 5)
√ bt = w(t) − bt−1
b0 = w(0), t = 0 : 21 √
l4,1 (t − 1.5) w(t) = 2 17[v(t) + v(t − 1) + v(t − 2) + v(t − 3)] v(t) = bt /(2 17)
b0 = w(0), bt = w(t) − (bt−1 + bt−2 + bt−3 ) t = 0 : 35
√ √
l−2,1 (t − 0.5) w(t) = 4 5[v(t) + v(t − 1))] v(t) = bt /(4 5)
b−14 = w(−14), bt = w(t) − bt−1 t = −14 : 7
TABLE 3.6
Model I (case B): Convolution equations for the 8 × 8 case
G-rays w = KAv, b = A−1 w v = Bw (v = Bb)
l1,0 (t) w(t) = 8v(t),
√ t = 0 : 7, (K = 8) √ v(t) = w(t)/8 √
l1,1 (t) w(t) = 8√2v(t), t = 0 : 14 (K = 8 2) v(t) = w(t)/(8
√ 2)
l1,2 (t + 0.5) w(t) = 4 5[v(t) + v(t + 1)] v(t) = bt /(4 5)
√ bt = w(t) − bt+1
b21 = w(21), t = 21 : −1 : 0√
l1,3 (t + 1) w(t) = 8 10/3[v(t) + v(t + 1) + v(t + 2)] v(t) = bt /(8/3 10)
√ bt = w(t) − (bt+1 + bt+2 )
b28 = w(28), t = 28 : −1 :√0
l1,4 (t + 1.5) w(t) = 2 17[v(t) + v(t + 1) + v(t + 2) + v(t + 3)] v(t) = bt /(2 17)
b35 = w(35), bt = w(t) − (bt+1 + bt+2 + bt+3 ) t = 35 : −1 : 0
√ √
l1,−3 (t + 1) w(t) = 8 10/3[v(t) + v(t + 1) + v(t + 2)] v(t) = bt /(8/3 10)
√ bt = w(t) − (bt+1 + bt+2 )
b7 = w(7), t = 7 : −1 : −21
√
l1,−2 (t + 0.5) w(t) = 4 5[v(t) + v(t + 1))] v(t) = bt /(4 5)
√ bt = w(t) − bt+1
b7 = w(7), t = 7 : −1 : −14√
l1,−1 (t) w(t) = 2/8v(t) v(t) = w(t)/(8 2)
bt = w(t) t = 7 : −1 : −7
l0,1 (t) w(t) = 8v(t),
√ t=0:7 v(t) = w(t)/8√
l2,1 (t + 0.5) w(t) = 4 5[v(t) + v(t + 1)] v(t) = bt /(4 5)
√ bt = w(t) − bt+1
b21 = w(21), t = 21 : −1 :√0
l4,1 (t + 1.5) w(t) = 2 17[v(t) + v(t + 1) + v(t + 2) + v(t + 3)] v(t) = bt /(2 17)
b35 = w(35), bt = w(t) − (bt+1 + bt+2 + bt+3 ) t = 35 : −1 : 0
√ √
l−2,1 (t + 0.5) w(t) = 4 5[v(t) + v(t + 1))] v(t) = bt /(4 5)
b7 = w(7), bt = w(t) − bt+1 t = 7 : −1 : −14
of A-rays,
t ∓ t0 p+s
L̃p,s,t (x, 1 − y) = Lp,s,t∓t0 (x, 1 − y) = + .
N 2N
Case A:
t − t0 p+s
L̃p,s,t (x, 1 − y) = Lp,s,t−t0 (x, 1 − y) = +
N 2N
t p+s 1 p+s t 1
= − − + = + .
N 2N N 2N N N
Case B:
t + t0 p+s
L̃p,s,t (x, 1 − y) =Lp,s,t+t0 (x, 1 − y) = +
N 2N
t p+s 1 p+s t p+s−1
= + − + = + ,
N 2N N 2N N N
where t = (p + s)(N − 1) : −1 : 0.
If p = 1,
t s
L̃1,s,t (x, 1 − y) = L1,s,t+t0 (x, 1 − y) = + ,
N N
and, if s = 1,
t p
L̃p,1,t (x, 1 − y) = Lp,1,t+t0 (x, 1 − y) = + .
N N
Thus, if p = 1,
t s
x + (1 − y)s = + , t = (s + 1)(N − 1) : −1 : 0,
N N
Image Processing 217
of A-rays
t ∓ t0 (p − N ) + 1
L̃p−N,1,t (x, 1 − y) = Lp−N,1,t∓t0 (x, 1 − y) = + .
N 2N
Case A:
t − t0 p−N +1
L̃p−N,1,t (x, 1 − y) =Lp−N,1,t−t0 (x, 1 − y) = +
N 2N
t N −p−1 p−N +1 t p+1
= − + = − 1− .
N 2N 2N N N
Thus
t p+1
x(p − N ) + (1 − y) = − 1− , t = (N − 1) : −1 : −(N − p)(N − 1).
N N
Case B:
t + t0 p−N +1
L̃p−N,1,t (x, y)=Lp−N,1,t+t0 (x, y) = +
N 2N
t N −p−1 p−N +1 t
= + + = .
N 2N 2N N
Thus
t
x(p − N ) + (1 − y) = , t = −(N − p)(N − 1) : 1 : (N − 1).
N
For each subset of generators, there are two cases, A or B, and one of
them can be selected to accomplish the method of image reconstruction. For
two scenarios, when only case A or B is considered for all four subsets of
generators of the set JN,N , the equations for G-rays are given in Tables 3.8
and 3.9, respectively. In the first column, the number I, II, III, or IV is
assigned to the subset containing generators (p, s).
Here we recall that for the generators (1, s), and (p, 1), such that p, s >
N/2, all equations for rays are written and the components of the 2-D paired
transform, or splitting-signals fTp,s 0 that are generated by these frequency-
points, are calculated by considering the change in direction of projections.
The (1, s)-projections are changed by the corresponding (1, s−N )-projections,
and the (p, 1)-projections by the (p − N, 1)-projections.
For the N = 8 case, Figure 3.85 shows two sets of angles of 12 projections
before and after changing the directions, Φ8,8 = {arctan(s/p); (p, s) ∈ J8,8 }
and Φ?8,8 = arctan(s/p); (p, s) ∈ J8,8 ?
. The sets of generators are defined as
J8,8 = {(p, 1); p = 0 : 7}, {(1, 2s); s = 0 : 3} ,
?
J8,8 = {(p, 1); p = 0 : 4}, {(p̄, 1); p̄ = −3 : −1}, {(1, 2s); s = 0 : 2}, (1, −2) .
Herewith, all these projections together with the remaining ones, are used
to calculate the 2-D discrete paired transform of the image, with genera-
tors (p, s) from the original set JN,N . That allows for using the existing
program for the inverse 2-D discrete paired transform (which is available at
http://www.fasttransforms.com).
Image Processing 219
TABLE 3.8
Model II (case A): Equations of G-rays for image N × N
(p, s) G-rays
t 1
I (1, 0) x− − =0 s=0
N 2N
t = 0 : (N − 1)
t 1
I (1, s) x − ys + s − − =0 s ≤ N/2
N N
t = 0 : (s + 1)(N − 1)
t s+1
II (1, s) x + y(N − s) + (s − N ) − + 1− =0 s > N/2
N N
t = (N − 1) : −1 : −(N − s)(N − 1)
t 1
III (0, 1) −y + 1 − − = 0, p=0
N 2N
t = 0 : (N − 1)
t 1
III (p, 1) xp − y + 1 − − =0 p ≤ N/2
N N
t = 0 : (p + 1)(N − 1)
t p+1
IV (p, 1) x(p − N ) − y + 1 − + 1− =0 p > N/2
N N
t = (N − 1) : −1 : −(N − p)(N − 1)
TABLE 3.9
Model II (case B): Equations of G-rays for image N × N
(p, s) G-rays
t 1
I (1, 0) x− − =0 s=0
N 2N
t = 0 : (N − 1)
t s
I (1, s) x − ys + s − − =0 s ≤ N/2
N N
t = (s + 1)(N − 1) : −1 : 0
t
II (1, s) x − y(s − N ) + (s − N ) − =0 s > N/2
N
t = −(N − s)(N − 1) : 1 : (N − 1)
t 1
III (0, 1) −y + 1 − − = 0, p=0
N 2N
t = 0 : (N − 1)
t p
III (p, 1) xp − y + 1 − − =0 p ≤ N/2
N N
t = (p + 1)(N − 1) : −1 : 0
t
IV (p, 1) x(p − N ) − y + 1 − =0 p > N/2
N
t = −(N − p)(N − 1) : 1 : (N − 1)
1 1
0.5 0.5
0 0
−0.5 −0.5
−1 −1
0 0.5 1 0 0.5 1
(a) (b)
FIGURE 3.85
Central angles of (a) original and (b) new 12 projections.
unknown image f(x, y) are described in matrix form by the Toeplitz matrices,
which are similar to the described N = 8 and N = 4 examples. We consider
separately the convolution equations of line-integrals for cases A and B.
1. Equations in case A
Subset I: p = 1 and s ≤ N/2.
When s 6= 0, the convolution equation w = Av is described as
√
1 + s2
w(t) = N [v(t) + v(t − 1) + v(t − 2) + ... + v(t − s + 1)],
s (3.111)
t = 0 : (1 + s)(N − 1),
b0 = w(0),
b1 = w(1) − b0 ,
b2 = w(2) − (b1 + b0 ),
b3 = w(3) − (b2 + b1 + b0 ),
(3.112)
... ... ... ... ... ...
bs−1 = w(s − 1) − (bs−2 + bs−3 + ... + b1 + b0 ),
bt = w(t) − (bt−1 + bt−2 + ... + bt−s+2 + bt−s+1)),
t = s, s + 1, . . . , (1 + s)(N − 1).
where (M = (1 + s)(N − 1). The required sums v(t) of the discrete image are
calculated by
s
v(t) = bt √ , t = 0 : (1 + s)(N − 1). (3.125)
N 1 + s2
In the s = 0 case, we have the following: v(t) = w(t)/N, t = 0 : (N − 1).
Subset II: p = 1 and s > N/2.
The projection (1, s) is described as the (1, s−N )-projection. The following
convolution equation w = Av is considered:
√
1 + s̄2
w(t) = N [v(t) + v(t + 1) + v(t + 2) + ... + v(t + s̄ − 1)],
s̄ (3.126)
t = (N − 1) : −1 : −s̄(N − 1),
where s̄ = N − s, and v(N ) = v(N + 1) = ... = v(N + s̄ − 2) = 0. The inverse
transform b = A−1 w is calculated by the recurrent form
bN−1 = w(N − 1),
bN−2 = w(N − 2) − bN−1 ,
bN−3 = w(N − 3) − (bN−2 + bN−1 ),
bN−4 = w(N − 4) − (bN−3 + bN−2 + bN−1 ),
... ... ... ... ... ... ... ... (3.127)
bN−s̄ = w(N − s̄) − (bN−s̄+1 + bN−s̄+2 + ... + bN−2 + bN−1 ),
bt = w(t) − (bt+1 + bt+2 + ... + bt+s̄+2 + bt+s̄−1)),
t = N − s̄ − 1, N − s̄ − 2, . . . , −s̄(N − 1).
where M = −s̄(N − 1). The required sums v(t) of the discrete image are
calculated by
s̄
v(t) = bt √ , t = (N − 1) : −1 : −s̄(N − 1). (3.128)
N 1 + s̄2
Subset III: p ≤ N/2 and s = 1.
When p 6= 0, the convolution equation w = Av is described as
p
1 + p2
w(t) = N [v(t) + v(t + 1) + v(t + 2) + ... + v(t + p − 1)],
p (3.129)
t = (p + 1)(N − 1) : −1 : 0,
where it is assumed that v(k) = 0, for k > (p+1)(N −1). The inverse transform
b = A−1 w is calculated by the following recurrent form: (M = (p+1)(N −1)):
bM = w(M ),
bM −1 = w(M − 1) − bM ,
bM −2 = w(M − 2) − (bM −1 + bM ),
bM −3 = w(M − 3) − (bM −2 + bM −1 + bM ),
(3.130)
... ... ... ... ... ...
bM −p+1 = w(M − p + 1) − (bM −p+2 + bM −p+3 + ... + bM −1 + bM ),
bt = w(t) − (bt+1 + bt+2 + ... + bt+p−2 + bt+p−1) ),
t = M − p, M − p − 1, . . . , 0.
224 CHAPTER 3: Image Reconstruction
where M = −p̄(N − 1). The required sums v(t) of the discrete image are
calculated by
p̄
v(t) = bt p , t = (N − 1) : −1 : −p̄(N − 1). (3.134)
N 1 + p̄2
Problems
Problem 3.1 Different sets of generators (p, s) can be used to cover the Cartesian
lattice 8 × 8 by sets Tp,s , but each such set will have a cardinality greater than
or equal to 12. For each (p, s)-projection, there are different ways to select the set
of G-rays which will be used to calculate the line-integrals wp,s (t). The number of
these integrals depends on (p, s). How would you choose the sets of generators and
G-rays, to obtain the minimum total number of G-rays for reconstructing the image
composed of rectangles on the lattice?
Problem 3.2 Consider the following image on the square [0, 1] × [0, 1] to be recon-
Image Processing 225
0 0 4 4 0 0 2 2
0 0 4 4 0 0 2 2
3 3 0 0 1 1 0 0
3 3 0 0 1 1 0 0
[f (x, y); 0 ≤ x, y ≤ 1 ] = .
0 0 2 2 0 0 4 4
0 0 2 2 0 0 4 4
1 1 0 0 3 3 0 0
1 1 0 0 3 3 0 0
Each square is referred to as an image element of size 1/8 × 1/8. Sketch the graphs
of line-integrals wp,s (t) of the (1, 2)- and (1, 5)-projections, i.e., when (p, s) = (1, 2)
and (1, 5). Use these integrals to calculate the line-sums vp,s (t) and splitting-signals
0
{fp,s,t ; t = 0 : 3}. Verify if these splitting-signals can be used to calculate the 2-D
0 0
DFT of the image in the sets of frequency-points T1,2 and T1,5 .
Problem 3.3 Suppose that you are given an image in the square [0, 1]×[0, 1], which
is composed of image elements of size 1/16 × 1/16 each with a constant intensity.
In this case, we say that the image is on the Cartesian lattice 16 × 16. Sketch line-
integrals along G-rays of the (1, 4)-projection and prove that these integrals can be
0
used to calculate the paired splitting-signal {f1,4,t ; t = 0 : 7} of the reconstructed
image 16×16. This means you can calculate the 2-D DFT of this image at frequency-
0
points of the set T1,4 .
Problem 3.4 Suppose that you are given an image on the square [0, 1] × [0, 1] and
the Cartesian lattice 10 × 10.
A. Determine the number of projections required to reconstruct the image.
B. Show that for each (p, s)-projection in A, a set of G-rays exists such that
the line-integrals along these rays can be used to calculate the splitting-signals
{fp,s,t ; t = 0 : 9}.
C. Develop the algorithm for full reconstruction of the given image from its pro-
jections and show your results. As an example, you can use the image in Problem 3.2
after extending the image to the size 10 × 10, by adding a zero column or row to
each side of the image.
Problem 3.5 ∗ In the described model 8 × 8, the G-rays are considered as lines.
Assume that the projections were obtained from the rays of width 6= 0. It means the
integrals wp,s (t) represent the integrals of the image along the wide rays. Assume
that the width of G-rays is a small number, for instance d < 1/64. Is it possible to
generalize the method of reconstruction described in this chapter to the case with
wide rays? Propose the method of transferring the geometry of wide G-rays to line
A-rays, to solve the problem of image reconstruction from its ray-projections.
Problem 3.6 ∗ For N = 2r , where r > 1, the basic functions of the 2-D discrete
paired transformation are described by the masks, or matrices with coefficients −1, 1,
and 0. It was shown in the N = 8 example, that all coefficients 1 and −1 are located
on parallel lines. Propose the concept of 2-D paired functions with the width 6= 0.
In other words, propose such 2-D binary functions on the square [0, 1] × [0, 1], whose
226 CHAPTER 3: Image Reconstruction
masks contain coefficients 1 and −1, which are located on different sets of parallel
wide rays.
A. Give examples of such wide-ray paired functions.
B. Discuss the property of orthogonality for the functions in A.
For instance, we studied the following functions. Given (p, s) 6= (0, 0), we consider
the set of parallel rays px+sy = t/N at the angle ϑ = − tan−1 (p/s) to the horizontal
line, where t runs a set of integers. We consider rays with width ∆ = ∆(p, s) and
the central line px + sy = t/N. Let a be the maximum width of the rays, which
is assumed to be the width of the disjoint next rays for the vertical or horizontal
projections, when (p, s) = (0, 1) and (1, 0), respectively. For wide rays with central
lines y = t/N or x = t/N, the maximum width is a = 1/N. This is the distance
between two neighbor points of the lattice N × N places in the square [0, 1] × [0, 1].
Definition 1: On the square [0, 1] × [0, 1] with the lattice XN,N on it, the wide
ray is defined by
1, if − a2 < px + sy − Nt ≤ a2 ,
rp,s,t (x, y; a) = (3.135)
0, otherwise,
where x, y ∈ [0, 1].
pThe width ∆(p, s) of the ray rp,s,t is calculated by ∆(p, s) = a/s cos(ϑ) =
a/ p2 + s2 , (s 6= 0). In the (1, s) = (1, 0) case, we consider ∆ = a.
Definition 2: Given triplet (p, s, t), the paired function of wide rays, or the wide
ray paired function on the square [0, 1] × [0, 1] is defined as
∞
X
χ0p,s,t (x, y; a) = (−1)k rp,s,t+k2r−n−1 (x, y; a), x, y ∈ [0, 1], (3.136)
k=−∞
where t ∈ [0, N/2 − 1]. For (p, s) = (0, 0), the paired function χ00,0,0 (x, y; a) ≡ 1.
As an example for the N = 8 case, Figure 3.86 shows two gray-scale images of
the paired wide ray functions for (p, s, t) = (1, 2, 1) and (4, 1, 3) in parts a and b,
respectively. White, black, and gray colors on the image correspond to the values of
1, −1, and 0, respectively.
0 0
0.25 0.25
0.5 0.5
0.75 0.75
1 1
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
(a) (b)
FIGURE 3.86
Images of functions (a) χ01,2,1 (x, y; a) and (b) χ04,1,3 (x, y; a), when a = 1/8.
4
Main Program of Image Reconstruction
227
228 CHAPTER 4: Main Program
image f (x, y)
1
Image composition: Random rectangles
?
Calculate (p, s)-projection 2 3
Generator set
?
4 J = {(p, s)}
Transform G-rays into A-rays, w → v
?
5
Composition of the vector a
?
Permutation of the vector a 6
? ?
7 8
N -point paired transform of a stop-points
?
Composition of 2-D paired transform 9
?
Inverse 2-D paired transform 10
?
reconstructed image fn,m
FIGURE 4.1
Block-diagram of image reconstruction (case N = 2r , r > 1), when the image
is composed of rectangles on the grid N × N placed in the square [0, 1] × [0, 1].
10. After processing all 3N/2 projections, the inverse 2-D DPT is calcu-
lated to obtain the reconstructed discrete image fn,m .
Now we describe each part in this block-diagram in more detail.
where the function rect2 (x, y) = rect(x)rect(y), and rect(t) = 1, if |t| < 1/2,
and 0, otherwise. The image f(x, y) is generated from a few rectangles rk (x, y)
defined by positions (xk , yk , ∆xk , ∆yk ), which are randomly placed in the
square on the grid N × N,
K
1 X x − xk 1 y − yk 1
f(x, y) = Rk rect − , − . (4.2)
(∆x)2 ∆xk 2 ∆yk 2
k=1
TABLE 4.1
Data of rectangles
k xk yk ∆xk ∆yk Rk
1 0.4219 0.4531 0.5000 0.2500 5
2 0.4688 0.2969 0.2188 0.4688 11
3 0.2188 0.4219 0.2656 0.2813 12
4 0.1875 0.1250 0.2969 0.4375 8
5 0.4219 0.2031 0.1875 0.1875 3
6 0.0938 0.0781 0.1406 0.0938 3
7 0.2969 0.4531 0.4688 0.1094 9
All data of random rectangles are generated first in the integer form as
shown in Table 4.2, and then they are used for the discrete grid N × N by
xk = x0k /N, yk = yk0 /N, ∆xk = ∆x0k /N, ∆yk = ∆yk0 /N, k = 1 : 7.
230 CHAPTER 4: Main Program
10
0.8
20
0.6 1
3 30
72
0.4 40
4
5
50
0.2
6
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
intensities: 5 11 12 8 3 3 9 grid 64x64
TABLE 4.2
Integer data of rectangles
k x0k yk0 ∆x0k ∆yk0 Rk
1 27 29 32 16 5
2 30 19 14 30 11
3 14 27 17 18 12
4 12 8 19 28 8
5 27 13 12 12 3
6 6 5 9 6 3
7 19 29 30 7 9
if (min(data_1rect)>1)
kk=0;
end
end
% data_1rect is in integer format [x,y,dx,dy].
% intensity (<=16) of the image is added:
data_1rect(5)=round(rand*16)+1;
data_allrect(k,:)=data_1rect;
end
draw_allfigures; % draw all rectangles on the square [0,1]x[0,1].
. . .
Case M1 (A3): Generators are (1, s), 0 ≤ s ≤ N/2, and equations are
xs − y + 1 − t − 1 = 0, when s 6= 0
N N
t 1
−y + 1 −
− = 0, when s = 0,
N 2N
where t = 0 : (s + 1)(N − 1). This is the case of A3 (see Table 3.8), when
changing the parameter p to s, and (p, 1) to (1, s).
Case M2 (A4): Generators are (1, s), s > N/2, and equations are
t 1
x(s − N ) − y − + (N − s) + 1 − = 0,
N N
where t = 0 : (N − s + 1)(N − 1). These equations correspond to case A4
t p+1
x(p − N ) + (1 − y) − + 1− = 0,
N N
t = (N − 1) : −1 : −(N − p)(N − 1),
For each (p, s) of this set, the corresponding (p, s)-projection is calculated.
The measurements of the projections, i.e., the line-integrals wl (t) of the image
f(x, y) along the rays l(t) = lp,s (t),
Z
wl (t) = fd (x, y)dl, (4.3)
l(t)
are calculated as the sum of measurements wl;k (t) of each rectangle rk (x, y).
In other words,
K
X K
X Z
wl (t) = wl;k (t) = Rk rk (x, y)dl. (4.4)
k=1 k=1 l(t)
Each such integral wl;k (t) is calculated by finding two points of intersection
of the ray l(t) with the k-th rectangle. We denote these points by A(t) =
p1 , b1 ) and B(t) = (a2 , b2 ), and the distance between them as ∆lk (t) =
(a
(a2 − a1 )2 + (b2 − b1 )2 . Then, the value of the line-integral wl;k (t) equals
To find the points of intersection of the line lp,s (t) with the rectangle
rk (x, y), one can perform a few verifications, namely, the maximum four fol-
lowing verifications:
t − s(yk + ∆yk )
1. x= ∈ [xk , xk + ∆xk ],
p
234 CHAPTER 4: Main Program
1 1
0.8 0.8
0.6 0.6
2 2
0.4 0.4
0.2 0.2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
FIGURE 4.3
The rectangle and rays passing through it.
t − p(xk + ∆xk )
2. y= ∈ [yk , yk + ∆yk ],
s
if the line px + sy = t intersects the vertical line x = xk + ∆xk ,
t − syk
3. x= ∈ [xk , xk + ∆xk ],
p
if the line px + sy = t intersects the horizontal line y = yk ,
t − pxk
4. y= ∈ [yk , yk + ∆yk ],
s
if the line px + sy = t intersects the vertical line x = xk . Verification #1
includes the (1, 0) case, when s = 0, and verification #4 includes the (0, 1)
case, when p = 0.
The positive answer in verification #1 results in the intersection point
(x, yk + ∆yk ). The positive answers in verifications #2, 3, and 4 result in
the intersection points (xk + ∆xk , y), (x, yk ), and (xk , y), respectively. These
different examples can be seen in Figure 4.3 for the rectangle r2 (x, y).
Each of these verifications requires a maximum of one multiplication or
division, because all generators (p, s) ∈ JN,N have the form (1, s) or (p, 1). Two
multiplications and one square root are required for computing ∆lk (t). Thus, a
total of six multiplications and one square root are used to find the intersection
of the line with the rectangle and calculate the length of the intersection. One
additional multiplication is used in the product wl;k (t) = Rk ∆lk (t).
It should be noted that three positive answers can be obtained in the case
when the line lp,s (t) passes along a side of the rectangle. These cases are
(p, s) = (1, 0) and (0, 1), because a rotation of rectangles in the image f(x, y)
is not considered. Four positive answers can also be obtained in the case where
Image Processing 235
the line lp,s (t) passes along a diagonal of the rectangle. In both such cases,
only two different points of intersection are considered. The case where the
line lp,s (t) intersects the rectangle in one point, i.e., the intersection is in a
corner of the rectangle, can be omitted.
The calculation of points of intersection of the line px + sy = t with one
of the sides of the rectangle can also be written on the unique form. Indeed,
consider the general form of the vertical and horizontal lines, p̂x + ŝy = t̂,
where p̂, ŝ = 0 or 1, and t̂ is one value from {xk , yk , xk + ∆xk , yk + ∆yk }. The
the solution of the system
px + sy = t
p̂x + ŝy = t̂
is −1
x ps t 1 ŝ −s t
= = .
y p̂ ŝ t̂ pŝ − sp̂ −p̂ p t̂
The determinant does not require a multiplication. It is probably the simplest
method of calculating the points of intersection of the line with the rectangle,
which uses two multiplications.
Below is the script of function intersection withrectangleA, which is used
in the main program for computing the intersection of the line with one rect-
angle.
% ------------------------------------------------------------
% call: intersection_withrectangleA.m / A.-M. Grigoryan, 2011
% The calculation of coordinates (x,y) of intersection
% of line "p_line=[p,s,-t]" which defines px+sy-t=0
% with the rectangle "p_rect=[x0,y0,x1,y1]"
% This code can be optimized, because p or s equals +1,-1.
% ------------------------------------------------------------
function p=intersection_withrectangleA(p_rect,p_line)
pp=[];
x0=p_rect(1,1); y0=p_rect(1,2);
x1=p_rect(2,1); y1=p_rect(2,2);
p=p_line(1); s=p_line(2); t=-p_line(3);
k=0; % number of intersections
if s==0 % (1,0) case, i.e. p=1 -> line is x=t
if (t>=x0) & (t<=x1)
r1=[t,y0]; r2=[t,y1]; pp=[pp;r1;r2]; k=k+2;
end
elseif p==0 % (0,1) case, i.e. s=1 -> y=t
if (t>=y0) & (t<=y1)
r1=[x0,t]; r2=[x1,t]; pp=[pp;r1;r2]; k=k+2;
end
else % case when p,s>0
x=(t-s*y1)/p; % 1. for line y=y1
if (x>=x0) & (x<=x1)
r1=[x,y1]; pp=[pp;r1]; k=k+1;
end
236 CHAPTER 4: Main Program
y=(t-p*x1)/s;
if (y>=y0) & (y<=y1) % 2. for line x=x1
r1=[x1,y]; pp=[pp;r1]; k=k+1;
end
x=(t-s*y0)/p; % 3. for line y=y0
if (x>=x0) & (x<=x1)
r1=[x,y0]; pp=[pp;r1]; k=k+1;
end
y=(t-p*x0)/s;
if (y>=y0) & (y<=y1) % 4. for line x=x0
r1=[x0,y]; pp=[pp;r1]; k=k+1;
end
end
% Calculate the points of intersection (all cases):
p=[];
if k==0 return end
if k==1 p=[pp;pp]; return end
if k==2
p=pp; return
elseif k>2
if pp(1,:)~=pp(2,:)
p(1:2,:)=pp(1:2,:); return
else
p(1,:)=pp(1,:); p(2,:)=pp(3,:);
end
end
% ---------------------------------------------------------
0.8 (x1,y2)
(x2,y2)
l(t1)
0.6
2
0.4
l(t2)
(x1,y1) (x2,y1)
0.2
l(t3) l(t4)
0
0 0.5 1
FIGURE 4.4
The rectangle and four parallel rays passing its corners.
denote the coordinates of the corners by (x1 , y2 ), (x2 , y2 ), (x1 , y1 ), and (x2 , y1 ),
Image Processing 237
which are on the parallel lines l(t1 ), l(t2 ), l(t3 ), and l(t4 ), respectively. Given
numbers p and s, we consider equations of these parallel lines px + sy = tk ,
k = 1 : 4, where
where y0 is the coordinate of the point of intersection of the line with the side
x = x2 , i.e., y0 = y1 + (x1 − x2 )p/s = x1 + (t1 − t2 )/s. The values of ∆1 (t)
and ∆3 (t) are calculated by
t − t1 t − t4
∆1 (t) = ∆2 (t), ∆3 (t) = ∆2 (t).
t2 − t1 t3 − t4
To calculate each value of tk , one operation of multiplication is required,
p one multiplication for ∆2 (t), assuming that the coefficient k(p, s) =
and
1 + (s/p)2 can be calculated in advance. Calculation of ∆1 (t) or ∆3 (t) re-
quired two multiplications. Thus, seven operations of multiplication and one
square root are used in this method.
where ∆l(p, s) denotes the length of the geometrical ray in the image element.
The calculation of the vector b from the set of integrals w is performed as
follows. We consider separately each of four subsets of generators (p, s).
Subset M1: (p = 1 and s ≤ N/2).
The number of line-integrals w(t) calculated along the geometrical rays
¯
l1,s (t) equals (1 + s)(N − 1) + 1. In the s = 0 case, b = w, and
v(t) = b(t)/N, t = 0 : (N − 1).
When s 6= 0, the convolution equation w = Av is described by
√
1 + s2
w(t) = N [v(t) + v(t − 1) + v(t − 2) + ... + v(t − s + 1)],
s (4.6)
t = 0 : (s + 1)(N − 1).
Therefore, the inverse transform b is calculated in the recurrent form,
b0 = w(0),
b1 = w(1) − b0 ,
b2 = w(2) − (b1 + b0 ),
b3 = w(3) − (b2 + b1 + b0 ),
(4.7)
... ... ... ... ... ...
bs−1 = w(s − 1) − (bs−2 + bs−3 + ... + b1 + b0 ),
bt = w(t) − (bt−1 + bt−2 + ... + bt−s+2 + bt−s+1)),
t = s, s + 1, . . . , (s + 1)(N − 1).
The required sums v(t) of the discrete image are calculated by
s
v(t) = bt √ , t = 0 : (1 + s)(N − 1). (4.8)
N 1 + s2
Below is the script (solution of linearsystemA.m) of the function that is
used for calculating the vector b.
% ---------------------------------------------------------
% call: solution_of_linearsystemA.m
% solution of the system with the upper triangular T-matrix
% w(t)= v(t)+v(t-1)+...+v(t-p+1)
% w=Av
% b=inv(A)w
% such systems of equations correspond to the case A.
function b=solution_of_linearsystemA(p,w)
N=length(w);
z=0;
for i1=1:p
b(i1)=w(i1)-z; z=z+b(i1);
end
for i1=p+1:N
b(i1)=w(i1)-z; z=z-b(i1-p)+b(i1);
end
% ---------------------------------------------------------
Image Processing 239
where it is assumed that v(k) = 0, for k > (1+p)(N −1). The inverse transform
b = A−1 w is calculated in the following recurrent form (M = (p + 1)(N − 1)):
bM = w(M ),
bM −1 = w(M − 1) − bM ,
bM −2 = w(M − 2) − (bM −1 + bM ),
bM −3 = w(M − 3) − (bM −2 + bM −1 + bM ),
... ... ... ... ... ... (4.10)
bM −p+1 = w(M − p + 1) − (bM −p+2 + bM −p+3 + ... + bM −1 + bM ),
bt = w(t) − (bt+1 + bt+2 + ... + bt+p−2 + bt+p−1) ),
t = M − p, M − p − 1, . . . , 0.
where it is assumed that v(k) = 0, for k < 0. Therefore, the solution in (4.10)
is calculated by
b00 = w(0),
b01 = w(1) − b00 ,
b02 = w(2) − (b01 + b00 ),
b03 = w(3) − (b02 + b01 + b00 ),
... ... ... ... ... ... (4.12)
b0p−1 = w(p − 1) − (b0p−2 + b0p−3 + ... + b01 + b0 ),
b0t = w(t) − (b0t−1 + b0t−2 + ... + b0t−p+2 + bt−p+1) ),
t = p, p + 1, . . . , (p + 1)(N − 1),
w=fliplr(w);
b=solution_of_linearsystemA(s,w);
b=fliplr(b);
vector b, and the required sums v(t) of the discrete image are calculated by
N −p
v(t) = bt p , t = 0 : (N − p + 1)(N − 1). (4.15)
N 1 + (N − p)2
For all generators (p, s) ∈ JN,N , in equations v(t) = bt /∆l(p, s), the corres-
ponding normalized coefficients ∆l(p, s) equal the lengths of the geometrical
rays in the image element. These coefficients are calculated in advance (as
delta r in the program) by
p
1 p2 + s2
∆l(p, s) = ,
N p+s−1
From the set of 22 components vt = v1,2 (t), t = 0 : 21, the components of the
vector a = (a0 , a1 , ..., a7)0 are composed as an = vn + vn+8 + vn+16 , n = 0 : 7.
It is assumed that vn+16 = 0, if n + 16 > 21. By means of the vector a, we
242 CHAPTER 4: Main Program
When calculating vector a from the sums vp,s (t) for the second and fourths
subsets of generators (i.e., for subsets M2 and M4), we need to take into ac-
count the fact that the control points of geometrical rays ¯lp,s (t) have negative
values as well. For the N = 8 case, Table 4.4 shows the original numbering of
the rays by t, for these subsets of generators, when (p, s) = (1, s), s > N/2,
and (p, s) = (p, 1), p > N/2, respectively.
As shown in (3.75), the four components of the paired transform with the
triplet-numbers (1, 5, 0), (1, 5, 1), (1, 5, 2), and (1, 5, 3) are calculated as follows:
0
f1,5,0 =(v0 + v−8 + v−16 ) − (v4 + v−4 + v−12 + v−20 ),
0
f1,5,1 =(v1 + v−7 + v−15 ) − (v5 + v−3 + v−11 + v−19 ),
0 (4.16)
f1,5,2 =(v2 + v−6 + v−14 ) − (v6 + v−2 + v−10 + v−18 ),
0
f1,5,3 =(v3 + v−5 + v−13 + v−21 ) − (v7 + v−1 + v−9 + v−17 ).
Denoting the sums vk0 = vk−21, equations in (4.16) and (4.17) can be
written respectively as
0 0 0
f1,5,0 = (v21 + v13 + v50 ) − (v25
0
+ v170
+ v90 + v10 ),
0 0 0 0 0 0 0
f1,5,1 = (v22 + v14 + v6 ) − (v26 + v18 + v10 + v20 ),
(4.18)
f1,5,2 = (v23 + v15 + v7 ) − (v27 + v19 + v11 + v30 ),
0 0 0 0 0 0 0
0 0 0
f1,5,3 = (v24 + v16 + v80 + v00 ) − (v28
0 0
+ v20 0
+ v12 + v40 ),
and
0
f1,5,0 =−a01 + a05 , 0
f1,5,1 = −a02 + a06 ,
0 (4.19)
f1,5,2 =−a03 + a07 , 0
f1,5,3 = −a04 + a00 .
The new components a0n are calculated by
X
a0n = 0
vn+8m = vn0 + vn+8 0
+ vn+16 0
+ vn+24 , n = 0 : 7,
m
0 0 0
and v29 = v30 = v31 = 0. Therefore, to obtain the order of components
0
an as in (4.17), the sign of all components can be changed with the following
permutation: {1, 2, 3, 4, 5, 6, 7, 0} → {0, 1, 2, 3, 4, 5, 6, 7}, or n → (n−1) mod 8,
n = 0 : 7.
It is not difficult to see that for the (1, 6)-projection, the similar renum-
bering, t → t − 14, of the control points results in the following representation
of the components with triplet-numbers (1, 6, 0), (1, 6, 1), (1, 6, 2) and (1, 6, 3):
0
f1,6,0 =−a02 + a06 , 0
f1,6,1 = −a03 + a07 ,
f1,6,2 =−a04 + a00 ,
0
f1,6,3 = −a05 + a01 .
0
In the general case of N, for s > N/2, the permutation of components a0n
0 0 0
for f1,s,0 , f1,s,1 , ..., f1,s,N/2−1) is described by
Therefore, for such generators (1, s), the function called vectorB indexcorection
is used after Avector composition, to accomplish the correct composition of
the N -dimensional vector a from the sums v(t).
% -------------------------------------------
% call: vectorB_indexcorrection.m
function A=vectorB_indexcorection(p,s,N,E)
N2=N/2;
if p==1
sN2=s-N2;
for t=0:N-1
t1=mod(t-sN2,N)+1;
a=E(t+1); A(t1)=-a;
end
end
if s==1
pN2=p-N2;
for t=0:N-1
t1=mod(t-pN2,N)+1;
a=E(t+1); A(t1)=-a;
end
end
% -------------------------------------------
For the subset M4 (or A2), when the generators are (p, 1) and p is even
and greater that N/2, the change in the numbering of the control points is
calculated in the same way and the function vectorB indexcorection is used af-
ter Avector composition, to accomplish the composition of the N -dimensional
vector a from the sums v(t) = vp,1 (t).
(4p, 4s), (8p, 8s), ..., (N/2p, N/2s), and (0, 0). In other words,
0 0 0 0 0 0
{fp,s,0 , fp,s,1 , fp,s,2 , fp,s,3 , fp,s,4 , ..., fp,s,N/2−1},
0 0 0 0
{f2p,2s,0 , f2p,2s,2 , f2p,2s,4 , ..., f2p,2s,N/2−2 },
{f 0 , f0 0
, ..., f4p,4s,N/2−4 },
P(p, s) = 4p,4s,0 4p,4s,4 (4.21)
... ... ... ...
0
{f },
N/2p,N/2s,0
{f 0 }.
0,0,0
This means the following (see Table 3.3): the 8-point DPT for the (1, 0)-
projection is complete, the 8-point DPT for the (1, 1)-projection is used to
calculate only the first 3 splitting-signals, the 8-point DPT for the (1, 2)-
projection is used to calculate only the first 2 splitting-signals, ..., and the 8-
point DPT for the (6, 1)-projection is used to calculate only the first splitting-
Image Processing 247
% ---------------------------------------------------------
% call: find_stoppoints.m (M. Grigoryan, 2011)
function Stop_points=find_stoppoints(N)
r=log2(N);
Stop_points=zeros(1,N-1);
o=zeros(1,N-1);
N2=N/2; n1=1; n2=N2; M2=N2;
for k=1:r
o(n1:n2)=M2;
N2=N2/2; M2=M2+N2; n1=n2+1; n2=n2+N2;
end
o=N-o(N-1:-1:1);
Stop_points=r-log2(o(1:N-1));
Stop_points=[Stop_points(1)+1 Stop_points];
% add the second part for the generators of parts 3,4.
s1=Stop_points(1)-1;
Stop_points=[Stop_points s1 Stop_points(3:2:N)];
% sum(Stop_points) = 3N-2
% ---------------------------------------------------------
We now consider briefly the concepts of the 1-D DPT and incomplete 1-D
DPT, and then we give the scripts of codes that perform these transforms.
FIGURE 4.5
Signal-flow graph of the fast eight-point DPT.
Below is the script fst 1d.m of the function which is used for calculating
the N -point DPT, when N > 1 is a power of two.
% ---------------------------------------
% call: fst_1d.m (A.M. Grigoryan, 1996)
function A=fst_1d(A,N,M)
% N=length(A); M=log2(N);
LK=0; NK=N; I=1; II=1;
while I <= M
NK=NK/2; LK=LK+NK; J=II;
while J <= LK
J1=J+NK;
T=A(J1); T1=A(J);
A(J1)=T1+T; A(J)=T1-T; J=J+1;
end
II=LK+1; I=I+1;
end
% ---------------------------------------
One can also use another function with script fastpaired 1d.m for cal-
culating the 1-D DPT, which is written in a simple form, but it does not
accomplish the calculation faster than fst 1d.m.
% ----------------------------------------------
% call: fastpaired_1d.m (M.M. Grigoryan, 2007)
function y=fastpaired_1d(x)
N=length(x);
if N==1
y=x;
else
N2=N/2;
Image Processing 249
x1=x(1:N2); x2=x(N2+1:N);
y1=x1+x2; y2=x1-x2;
y=[y2 fastpaired_1d(y1)];
end
% ----------------------------------------------
% ----------------------------------------------
% call: incomplete_dpt.m (M.M. Grigoryan, 2011)
function y=incomplete_dpt(x,Ls)
N=length(x);
if (length(x)==1) | (Ls==0)
y=x;
else
N2=N/2;
y(1,1:N2)=x(1,1:N2)-x(1,N2+1:end);
Ls=Ls-1;
if Ls~=0
z(1,1:N2)=x(1,1:N2)+x(1,N2+1:end);
y=[y incomplete_dpt(z,Ls)];
end
end
% ----------------------------------------------
% ------------------------------------------------
% call: incopletefst_1d.m (A.M. Grigoryan, 2011)
function B=incompletefst_1d(A,Ls)
N=length(A); M=log2(N);
LK=0; NK=N;
if Ls>M Ls=M+1; end
I=1; II=1;
while I <= Ls
NK=NK/2; LK=LK+NK; J=II;
while J <= LK
J1=J+NK;
T=A(J1); T1=A(J);
A(J1)=T1+T; A(J)=T1-T; J=J+1;
end
II=LK+1; I=I+1;
end
if Ls<M B=A(1:LK);
250 CHAPTER 4: Main Program
For the 8 × 8 case, the 2-D DPT is transformed into the square matrix as
’1,0,0’ ’1,0,1’ ’1,0,2’ ’1,0,3’ ’0,1,0’ ’0,1,1’ ’0,1,2’ ’0,1,3’
’1,1,0’ ’1,1,1’ ’1,1,2’ ’1,1,3’ ’2,1,0’ ’2,1,1’ ’2,1,2’ ’2,1,3’
’1,2,0’ ’1,2,1’ ’1,2,2’ ’1,2,3’ ’4,1,0’ ’4,1,1’ ’4,1,2’ ’4,1,3’
’1,3,0’ ’1,3,1’ ’1,3,2’ ’1,3,3’ ’6,1,0’ ’6,1,1’ ’6,1,2’ ’6,1,3’
’1,4,0’ ’1,4,1’ ’1,4,2’ ’1,4,3’ ’2,0,0’ ’2,0,2’ ’0,2,0’ ’0,2,2’
’1,5,0’ ’1,5,1’ ’1,5,2’ ’1,5,3’ ’2,2,0’ ’2,2,2’ ’4,2,0’ ’4,2,2’
’1,6,0’ ’1,6,1’ ’1,6,2’ ’1,6,3’ ’2,4,0’ ’2,4,2’ ’4,0,0’ ’0,4,0’
’1,7,0’ ’1,7,1’ ’1,7,2’ ’1,7,3’ ’2,6,0’ ’2,6,2’ ’4,4,0’ ’0,0,0’
This representation of the 2-D DPT was illustrated for the “tomo” image
in Figures 2.16 and 2.17.
Therefore, we first need to locate each part P(p, s) in this square matrix.
Since the components of the 2-D DPT are numbered by triplets (p, s, t), we
use function map pst2nm to transfer the triplets into the corresponding numbers
0
(n, m), which show the locations of components fp,s,t in the matrix.
% ----------------------------------------
% call: map_pst2nm.m
function nm=map_pst2nm(N,p,s,t)
if (p==0) & (s==0) & (t==0)
nm=[N,N];
return
end
if p==1
nm=[s+1,t+1];
elseif s==1
nm=[p/2+1,N/2+t+1];
else
N2=N/2;
nm=N2+map_pst2nm(N2,p/2,s/2,t/2);
Image Processing 251
end
% ---------------------------------------
For example, for the image 256×256, the command map pst2nm(256,p,s,t)
gives nm = (1, 2), (4, 3), and (130, 133), when (p, s, t) = (1, 0, 1), (1, 3, 2) and
(2, 2, 8), respectively. The function checking table is written to calculate the
entire matrix of such triplet-numbers in the general N = 2r case, when r ≥ 2.
% ---------------------------------------------------
% call: checking_table.m
% To calculate the table NxN of triplets (p,s,t).
N=8; L=3*N-2-1; N2=N/2-1;
Jps=setof_ps(N);
A=cell(N);
for k=1:L
p=Jps(k,1); s=Jps(k,2); g=gcd(p,s);
p_instring=num2str(p); s_instring=num2str(s);
ss=strcat(p_instring,’,’,s_instring,’,’);
for t=0:g:N2
t_instring=num2str(t); ss2=strcat(ss,t_instring);
nm=map_pst2nm(N,p,s,t); n=nm(1); m=nm(2);
A(n,m)={ss2};
end
end
A(N,N)={’0,0,0’};
% ---------------------------------------------------
n, m = 0 : (N − 1).
% --------------------------------------------------------------
% Call: inverse_2DDPT.m
% split_matrix is the image-matrix of the 2-D DPT.
% Jps=setof_ps(N) is the set of all 3N-2 generators (p,s).
% A.M. Grigoryan and Nan Du, 10/27/2009
% --------------------------------------------------------------
function image_fromPT=inverse_2DDPT(split_matrix,Jps,N)
L=length(Jps);
% The inverse formula of the 2-D paired transform:
image_fromPT=zeros(N);
252 CHAPTER 4: Main Program
20
0.8
5 4
40
0.6 9 2
7 60
8
10
0.4 6 1 80
0.2 100
3
120
0
0 0.2 0.4 0.6 0.8 1 20 40 60 80 100 120
intensities: 8 10 16 9 16 9 15 4 11 8 cpu time/rect=0.40 min
used in calculations. The use of the complete 1-D DPT for all projections
required 24.87 seconds. The CPU time is calculated as the average time for
one rectangle. The process of calculation is organized so that for each (p, s)-
projection, the integrals are calculated for each rectangle separately, and then
the results are added.
Figure 4.7 shows ten rectangles on the square [0, 1] × [0, 1] on the left.
The coordinates of these rectangles are on the grid 256 × 256. The image
calculated from 384 projections is shown on the right. The reconstruction is
0.8 1 8 50
9
0.6 100
5
3
0.4 10 150
4
6 7
0.2 200
2
0 250
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 4 7 11 6 14 9 15 5 11 1 cpu time/rect=4.56 min
exact, and the main program required 4.56 minutes to calculate all projections
and reconstruct the image. Incomplete 1-D DPTs were used in calculations.
The use of complete 1-D DPTs for all projections required 4.68 minutes, which
exceeds the time with incomplete DPTs, because of many repetitions in the
process of calculating the 2-D DPT of the discrete image.
Time characteristics of calculation, when the program was implemented in
MATLAB are given in Table 4.5. The time for calculation of the 2-D paired
transform and its inverse transform are also given.
TABLE 4.5
Time for MATLAB-based program
N incomplete 1-D DPT complete 1-D DPT 2-D DPT 2-D iDPT
32 0.48s/rec 0.59s/rec 0.0312s 0.0156s
64 2.58s/rec 2.68s/rec 0.0468s 0.0780s
128 24.01s/rec 24.87s/rec 0.2028s 0.5304s
256 4.56m/rec 4.68m/rec 1.8564s 4.4460s
Time data of the program implemented in Ci+ is given in Table 4.6, when
the reconstruction is performed by incomplete 1-D DPTs. The time includes
the calculation of all line-integrals w(t), line-sums v(t), and the calculation of
the 2-D direct and inverse paired transforms. The data in these tables were
TABLE 4.6
Total time for the Ci-based program (14 random rectangles)
N ×N Image scanning & reconstruction with incomplete 1-D DPTs
32 × 32 00 : 00 : 00.03
64 × 64 00 : 00 : 00.11
128 × 128 00 : 00 : 00.79
256 × 256 00 : 00 : 06.17
512 × 512 00 : 00 : 49.76
1024 × 1024 00 : 06 : 59.09
obtained from running programs on a personal computer with Intel Dual CPU
Processor at 3.20-GHz speed. This is the first realization of the method on
Ci+, which can be improved, in order to achieve a fast reconstruction of images
on the large size Cartesian lattices.
All image elements (IE) have the same size ∆x × ∆y, which is conside-
red equal to the size of the small square 1/N × 1/N in the program. There
is no need to calculate the coordinates of intersections of G-rays with each
rectangle and then calculate the lengths of intersections, because the lengths
of intersection of rays with each square are equal. It is sufficient, therefore, to
determine the set of squares, along which the rays pass. In other words, one
can represent each ray by the set of such squares
We number each square by the coordinates (nk , mk ) of its bottom left corner.
The number K of such squares depends on p, s, and t, i.e., K = K(p, s, t).
Then, the line-integrals of the image can be calculated by
X
w(t) = ∆l(p, s) f(nk − 0.5, mk − 0.5), t = 0 : (p + s)(N − 1).
(nk ,mk )∈lp,s (t)
Now we describe this method in detail, which we call the method of fast
projection integrals by squares (FPIS).
For that we first consider the simple script (control points rays.m) of the
function that calculates all control points of rays lp,s (t) for the given (p, s)-
projection. The control points show how the rays are numbered. If we con-
sider the process of projection data collection for the parallel X-ray set, as in
computerized tomography [29], the control points determine the location and
numbering of radiation sources on the transmission side and the detectors on
the receiving side.
% ================================================================
function nm=control_points_rays(p,s,N) / M.M. Grigoryan, May 2011
%---------------------------------- 1st part of (p,s)
if (p==1) & (s<=N/2)
b=1;
if s==0
b=0;
end
for i1=1:N-s+b
nm(i1,1:2)=[i1,1];
end
for i2=1:N
for s1=s:-1:1
nm(i1,1:2)=[N-s1+1 i2]; i1=i1+1;
end
end
return
end
%---------------------------------- 2nd part of (p,s)
if (p==1) & (s>N/2)
s=N-s;
256 CHAPTER 4: Main Program
for i1=1:N-s+1
nm(i1,1:2)=[i1,N];
end
for i2=N:-1:1
for s1=s:-1:1
nm(i1,1:2)=[N-s1+1 i2]; i1=i1+1;
end
end
return
end
%---------------------------------- 3rd part of (p,s)
if (s==1) & (p~=1) & (p<=N/2)
b=0;
if p~=0 b=1; end
for i1=1:N-p+b
nm(i1,1:2)=[1,i1];
end
for i2=1:N
for p1=p:-1:1
nm(i1,1:2)=[i2 N-p1+1]; i1=i1+1;
end
end
return
end
%---------------------------------- 4th part of (p,s)
if (s==1) & (p>N/2)
p=N-p;
i1=1;
for i2=N:-1:1
for p1=1:p
nm(i1,1:2)=[i2 p1]; i1=i1+1;
end
end
for i2=p+1:N
nm(i1,1:2)=[1 i2]; i1=i1+1;
end
return
end
% ==============================================================
The number of rays lp,s (t) in the (p, s)-projection equals (p+s)(N −1)+1,
if p, s ≤ N/2, and (N − p + s)(N − 1) + 1, and (p + N − s)(N − 1) + 1, if
p > N/2 and s > N/2, respectively.
For example, when N = 8, the set of 22 control points on the lattice 8 × 8
Image Processing 257
0 0
0 7 6 5 4 3 2 1 0
0 0
0.25 0.25
1 10 9 8
1 1
0.25 0.25
2 13 12 11
2 2
0.375 0.375
3 16 15 14
y and m
y and m
3 3
0.5 0.5
4 19 18 17
4 4
0.625 0.625
5 22 21 20
5 5
0.75 0.75
6 8 10 12 14 16 18 20 25 24 23
6 6
0.875 0.875
7 9 11 13 15 17 19 21 28 27 26
7 7
1 1
0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1 0 0.12 0.25 0.37 0.5 0.62 0.75 0.87 1
x and n x and n
FIGURE 4.8
Control points for the (2, 1)- and (1, 5)-projections in the 8 × 8 case.
In general, for the given (p, s)-projection, the corresponding set of points
can be calculated by the program ps Arays points.m with the following script.
% ==========================================================
function S=ps_Arays_points(p,s,N) / M.M. Grigoryan, May 2011
% ----------------------------------------------------------
S=1;
nm=control_points_rays(p,s,N); sz=size(nm);
%-------- 1th set of generators ---------
if (p==1) & (s<=N/2)
for i1=1:sz(1)
iy=nm(i1,1); ix=nm(i1,2);
six=s*ix; t=iy+six;
while(iy>0) & (ix<=N)
fprintf(’ (%d,%d) ’ ,iy,ix); % (*)
ix=ix+1; six=six+s; iy=t-six;
end
fprintf(’\n’);
end
return
end
%-------- 2nd set of generators ---------
if (p==1) & (s>N/2)
s=N-s;
for i1=1:sz(1)
iy=nm(i1,1); ix=nm(i1,2);
six=s*ix; t=iy-six;
while(ix>0) & (iy>0)
fprintf(’ (%d,%d) ’ ,iy,ix); % (*)
ix=ix-1; six=six+s; iy=t+six;
end
fprintf(’\n’);
end
return
end
%-------- 3rd set of generators ---------
if (s==1) & (p<=N/2)
for i1=1:sz(1)
iy=nm(i1,1); ix=nm(i1,2);
piy=p*ix; t=piy+ix;
while(ix>0) & (iy<=N)
fprintf(’ (%d,%d)’ ,iy,ix); % (*)
iy=iy+1; piy=piy+p; ix=t-piy;
end
fprintf(’\n’);
end
return
end
%-------- 4th set of generators ---------
if (s==1) & (p>N/2)
260 CHAPTER 4: Main Program
p=N-p;
for i1=1:sz(1)
iy=nm(i1,1); ix=nm(i1,2);
piy=p*iy; t=ix-piy;
while(iy<=N & ix<=N)
fprintf(’ (%d,%d)’ ,iy,ix); % (*)
iy=iy+1; piy=piy+p; ix=t+piy;
end
fprintf(’\n’);
end
return
end
% ====================================================
The above two sets of coordinates for rays of the (1, 1)- and (1, 2)-
projections are calculated by using the following commands:
N=8;
p=1; s=1; S=ps_Arays_points(p,s,N);
p=1; s=2; S=ps_Arays_points(p,s,N);
To obtain values of the sums v(t) along each A-ray of the (p, s)-projection,
the sums of the image f(x, y) in the corresponding set of points is calcu-
lated. To accomplish this calculation, we can make a few changes in pro-
gram ps Arays points.m. Namely, we substitute the first command S=1 by
S=zeros(1,size(sz)), the printing commands which are marked as (*) by
S(1,i1)=S(1,i1)+A(iy,ix), and remove commands fprintf(’\n’). Here “A”
stands for the image f(x, y). We add this new function with the syntax defi-
nition function S=ps Arays(A,p,s,N).
Example 4.1 We consider the following image on the lattice 4 × 4 :
1 5 9 13
2 6 10 14
3 7 11 15 .
[fd (x, y)] =
4 8 12 16
The call of the program
N=4; A=1:N*N; A=reshape(A,4,4);
p=1;
for s=0:3
Vps=ps_Arays(A,p,s,N)
end
results in the following values of the (1, 0)-, (1, 1)-, (1, 2)-, and (1, 3)-
projections.
{v1,0 (t); t = 0 : 3} = {28, 32, 36, 40},
{v1,1 (t); t = 0 : 6} = {1, 7, 18, 34, 33, 27, 16},
{v1,2 (t); t = 0 : 9} = {1, 2, 8, 10, 16, 18, 24, 26, 15, 16},
{v1,−1 (t); t = 0 : 6} = {13, 23, 30, 34, 21, 11, 4}.
Image Processing 261
% ======================================================
function S=Arays2grid(p,s,N) / M.M. Grigoryan, June 2011
% ------------------------------------------------------
nm=control_points_rays(p,s,N); sz=size(nm);
S=zeros(sz(1),N,2);
%-------- 1th set of generators ---------
if (p==1) & (s<=N/2)
for i1=1:sz(1)
iy=nm(i1,1); ix=nm(i1,2);
six=s*ix; t=iy+six;
n_pst=0;
while(iy>0) & (ix<=N)
n_pst=n_pst+1; S(i1,n_pst,:)=[iy,ix];
ix=ix+1; six=six+s; iy=t-six;
end
end
return
end
... ... ...
For fast calculation of line-integrals w(t) = wp,s (t) of the (p, s)-projection,
we can use the system of linear equations that is described in Section 4.5. For
instance, for the generator (p, s) = (1, s), when 0 < s ≤ N/2, we consider the
convolution equation
% ================================================
% call: Aray2Gray_case1.m / A.-M. Grigoryan 2011
% Vps is the set of sums v(t) of (p,s)-projections:
% Vps={Vps(t),t=1:L}, L=(1+s)(N-1)+1.
262 CHAPTER 4: Main Program
For generators of the subset M 3, when (p, s) = (p, 1) and 0 < p ≤ N/2,
we have another system of equations
% =================================================
% call: Aray2Gray_case2.m / A.-M. Grigoryan 2011
% Vps is the set of sums v(t) of (p,s)-projections:
% Vps={Vps(t),t=1:L}, L=(p+1)(N-1)+1.
% The generators (p,s)=(p,1), 0<p<=N/2.
% ------------------------------------------------
function Wps=Aray2Gray_case2(Vps,p,L)
Wps=zeros(1,L);
p1=p-1;
for t=1:L-p1
Wps(t)=sum(Vps(t:t+p1));
end
for t=L-p1+1:L
Wps(t)=sum(Vps(t:L));
end
dl=N*sqrt(1+p^2)/p; Wps=Wps*dl;
% =================================================
Example 4.2 To illustrate the line-integrals w(t) and sums v(t), we consider
the image composed of seven rectangles shown in Figure 4.9 in part a. The
data of these rectangles are given in integer form in Table 4.7, where
10
0.8
3
5 20
2
0.6
30
0.4 1 40
7 4
6 50
0.2
60
0
0 0.5 1 20 40 60
(a) (b)
150 2
1.5
100
1
50
0.5
0 0
0 50 100 150 0 50 100 150
(c) (d)
FIGURE 4.9
(a) Seven rectangles on the square [0, 1] × [0, 1], (b) image composed from
these rectangles, (c) sums v(t), and (d) integrals w(t) of the (1, 2)-projection.
Below is the script of the program for calculating the image f(x, y) from
the random rectangles. Here, imageSQ model stands for the discrete image
f(x, y) and data allrect is used for the data of seven rectangles, as in code
image reconstructionA3A4B1A2.m, which is given in Section 4.2.
% ----------------------------------------------------------------
% composition of the gray-scale image fd(x,y) from rectangles
N=64;
many_rectangles=7;
imageSQ_model=zeros(N,N);
for k=1:many_rectangles
data_1rect=data_allrect(k,:);
x=data_1rect(1); dx=data_1rect(3);
y=data_1rect(2); dy=data_1rect(4); x1=x+dx; y1=y+dy;
d_intensity=data_1rect(5);
imageSQ_model(x:x1,y:y1)=imageSQ_model(x:x1,y:y1)+d_intensity;
end
imageSQ_model=imageSQ_model(:,N:-1:1);
% to display the image use: imagesc(imageSQ_model’);
% ----------------------------------------------------------------
For the same image, Figure 4.10 shows sums v(t) and integrals w(t)
of the (1, 3)- and (2, 1)-projections in parts (a), (b), and (c), (d), respec-
tively. These projections are at angles 90◦ − arctan(1/3) = 71.5651◦ and
90◦ − arctan(2) = 26.5651◦ to the horizontal axis. From these graphs, one can
notice the difference between A-ray and G-ray integrals, namely, the straigh-
tening out of oscillations in the line-integrals w(t).
Example 4.3 We consider the gray-scale discrete image fn,m , which is the
modified Shepp-Logan phantom from the MATLAB library. We can assume
that this image represents the image f(x, y) on the grid 256 × 256. Each value
of the discrete image corresponds to the value of f(x, y) on the (n, m)-th
square of size 1/256 × 1/256. To call this image and put it in the gray-scale
[0, 255], we use the following commands:
Figure 4.10 shows the phantom image in part a, along with the sums v(t)
and integrals w(t) of the (1, 2)-projection in parts c and d, respectively. The
number of rays in the (1, 2)-projection equals 766 = (1 + 2)255 + 1.
The FIPS method is fast. For comparison we consider the time data given
in Table 4.5 for the main program A3-A4-B1-A2. The total time of processing
images of sizes 64 × 64, 128 × 128, and 256 × 256 equals 0.9048 s, 8.4865 s,
and 3.48 min, respectively.
Image Processing 265
2
100
1.5
50 1
0.5
0 0
0 50 100 150 200 250 0 50 100 150 200 250
(a) (b)
200
3
150
2
100
1
50
0 0
0 50 100 150 0 50 100 150
(c) (d)
FIGURE 4.10
(a,b) Sums v(t) and integrals w(t) of the (1, 3)-projection, and (c,d) sums v(t)
and integrals w(t) of the (2, 1)-projection.
(a)
6000
10000
4000
5000
2000
0 0
0 200 400 600 0 200 400 600
(b) (c)
FIGURE 4.11
(a) Phantom image, (b) sums v(t), and (c) integrals w(t) of the (1, 2)-
projection.
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1
(a) (b)
FIGURE 4.12
Sets of angles for 12 projections for model 8 × 8.
For that, we first consider the N = 16 case. The set of angles Ψ(16) is
1.5708 (π/2),
0.7854, 0.4636, 0.3218, 0.2450,
0.1974, 0.1651, 0.1419, 0.1244,
Ψ = 2.9997, 2.9764, 2.9442, 2.8966, 2.8198, 2.6779, 2.3562,
0,
1.1071, 1.3258, 1.4056, 1.4464, 1.7359, 1.8158, 2.0344.
Image Processing 267
N=8
N=16
N=32
FIGURE 4.13
Sets of angles for 3N/2 projections for the cases when N = 8, 16, and 32.
N=16; L=N+N/2;
Jps=ps_generators(N);
A1=zeros(1,L); A1(1)=pi/2;
for k=2:L
p=Jps(k,1); if p>N/2 p=p-N; end
s=Jps(k,2); if s>N/2 s=s-N; end
A1(k)=-atan(s/p); % in radians
end
A1=pi/2+A1; A1(1)=pi/2+0;
The generators (1, 7), (3, 5), (5, 3), and (7, 1) are equivalent in the sense
0 0 0 0
that T1,7 = T3,5 = T5,3 = T7,1 , and the number of parallel rays for the (1, 7)-,
(3, 5)-, (5, 3)-, and (7, 1)-projections is the same, (1+7)15+1 = (3+5)15+1 =
. . . = 121. The angles of three new projections are 0.5404, 1.0304, and 1.4289,
respectively (in radians).
268 CHAPTER 4: Main Program
An=zeros(1,N/2);
for k=1:N/2
p1=Tps(k,1); if p1>N/2 p1=p1-N; end
s1=Tps(k,2); if s1>N/2 s1=s1-N; end
An(k)=-atan(s1/p1);
end
An=pi/2+An
% 0.1419 0.5404 1.0304 1.4289 1.4289 1.0304 0.5404 0.1419
The first three angles 0.1419, 0.5404, and 1.0304 are shown beneath the first
0 , as well as two other splitting-
line in Figure 4.14. The splitting-signal fT1,7
N=16
FIGURE 4.14
Two sets of angles for 24 projections for the N = 16 case.
signals fT3,5
0 and fT5,3
0 determine the 2-D DFT of the image at the same set
0
of frequency-points, T1,7 . Thus, one of these projections can be used instead
of the (1, 7)-projection. For example, we consider the (3, 5)-projection. That
means the angle 0.1419 of the projection is changed by 0.5404, as shown in
the figure in the second line of angles. In the obtained new set of generators
J16,16, we can also substitute other angles and make all angles more uniformly
distributed in the interval [0, 1]. The question is, can one write an optimal code
to obtain such distribution of the angles in the interval [0, π], for the general
N case?
Problems
Problem 4.1 Develop the program for image reconstruction in the square
[0, 1] × [0, 1], by using the method of fast projection integrals by squares,
which is given in Section 4.8. Discuss the performance of your program.
How fast is your program in comparison with the main program with script
image reconstionA3A4B1A2.m? Show by example that this method is effective.
Assume that the reconstruction is on the lattice 256 × 256 and the image
f(x, y) is composed of a few random rectangles.
Problem 4.2 In the 2nd and 3rd columns of Table 4.5, the time data de-
scribe the total time of program performance. It includes the time required
Image Processing 269
for calculating the line-integrals w(t) for all projections, the time for calcu-
lating the sums v(t) for these integrals, and the time for calculating the 2-D
paired and its inverse transformations. Assume that the measurement data,
or line-integrals are given. Determine how much of the time is used for recon-
structing the image directly from the line-integrals. Give your answer in the
form of a table for images of sizes 64 × 64, 128 × 128, and 256 × 256.
Problem 4.3 Different sets JN,N of generators (p, s) can be used when im-
plementing the proposed method of image reconstruction by transferring the
geometry of G-rays to A-rays. The angles can be spread approximately uni-
formly in the interval [0, π), or they can be moved into a small subinterval of
[0, π). How you would select the angles for projections for image reconstruc-
tion? Discuss the N = 32 example.
Problem 4.4 As mentioned in Section 4.3, the main program of image recon-
struction is referred to as A3-A4-B1-A2 code. Different types of equations for
geometrical rays and convolution are considered. Propose the A3-A4-A1-A2
code, when the same type, A, equations are selected for all four subsets M1,
M2, M3, and M4 of generators (p, s) of the set JN,N .
Problem 4.5 Discuss how would you improve the main program for image
reconstruction, which is described in this chapter. Propose your program for
image reconstruction and give an example of the reconstruction.
Problem 4.6∗ Assume that you are given the image with a rectangle whose
one or a few vertices are not on the Cartesian lattice. For instance, let N = 8
and let the image be the following rectangle of length 1.5(1/8) :
1; if x ∈ [1/4, 3/8 + 1/16], y ∈ [1/4, 3/8],
f(x, y) =
0; otherwise.
The image consists of one square (which we call particle) and one half-square
(which we call semi-particle) and it is shown in Figure 4.15 in part a. In the
ideal case, the image we would like to obtain is
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
f1.5 =
0
.
0 0 0 0 0 0 0
0 0 1 0.5 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
Discuss the result of reconstruction of this image. Would you receive a good re-
construction after thresholding the reconstruction? If yes, propose an example
of such thresholding and show your result.
270 CHAPTER 4: Main Program
1 1
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
(a) (b)
FIGURE 4.15
Image with (a) one rectangle and (b) shifted particle on the lattice 8 × 8.
This image is shown in Figure 4.15 in part b. The image we would like to
obtain is probably the following:
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
fs =
0
.
0 0 0 0 0 0 0
0 1 1 0 0 0 0 0
0 1 1 0 0 0 0 0
0 0 0 0 0 0 0 0
271
272 CHAPTER 5: TENSOR TRANSFORM METHOD
For image reconstruction, we will use this simple formula of the inverse tensor
transformation, which is the transformation from the 2-D frequency and 1-D
time space to the 2-D image space.
Here the image f(x, y) is given together with the discrete image fn,m to be
reconstructed from eight projections of f(x, y). For simplicity of calculations,
all values of the image f(x, y) are given with the factor of 49, which is N 2 .
Each IE has the size ∆x∆y = (1/7)· (1/7) = 1/49. Therefore, for instance, the
value of f2,0 is calculated as the integral of the image f(x, y) in the (2, 0)-th
IE, which equals (3 × 49)∆x∆y = 3.
Image Processing 273
Figure 5.1 shows the masks of the first two basic functions. Seven rays
l(0) l(1)
0 0
0 0
0.14 0.14
1 1
0.28 0.28
2 2
0.42 0.42
y and m
y and m
3 3
0.57 0.57
4 4
0.71 0.71
5 5
0.85 0.85
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.28 0.42 0.57 0.71 0.85 1 0 0.14 0.28 0.42 0.57 0.71 0.85 1
x and n x and n
FIGURE 5.1
Masks [χ1,0,0] and [χ1,0,1] of the tensor functions for the (1, 0)-projection.
of the horizontal projection are used to define all components of the tensor
transforms with triplet-numbers of U (1, 0). We define the control points of
these rays by the bullets through which the rays pass. These control points
are numbered as
. . . . . . .
.. .. .. .. .. .. ..
. . . . . . . (angle of rays is 90◦ ).
0 1 2 3 4 5 6
• • • • • • •
The sums of the image along the rays l(t) = {x = t + 1/(2N )} are denoted
by vt = v1,0 (t), where t = 0 : 6. The components of the tensor transform with
the triplet-numbers (1, 0, t) are equal to these sums:
f1,0,0 = v0 , f1,0,1 = v1 , f1,0,2 = v2 , . . ., f1,0,6 = v6 . (5.3)
274 CHAPTER 5: TENSOR TRANSFORM METHOD
The length of intersection of the geometrical ray l(t) with the image element
equals ∆x = 1/7. Therefore, the line-integrals equal
1
w(t) = w1,0 (t) = v(t) = 7v(t), t = 0 : 6,
∆x
and v(t) = w1,0 (t)/7, t = 0 : 6. The values of these line-integrals for the given
image f(x, y) can be calculated by
w(0) = 7(1 + 1 + 0 + 2 + 0 + 2 + 1) = 7 × 7 = 49
w(1) = 7(1 + 1 + 2 + 3 + 3 + 3 + 9) = 7 × 22 = 154
w(2) = 7(3 + 1 + 2 + 4 + 4 + 1 + 2) = 7 × 17 = 119
w(3) = 7(1 + 2 + 1 + 2 + 8 + 8 + 4) = 7 × 26 = 182
w(4) = 7(2 + 1 + 1 + 1 + 9 + 7 + 3) = 7 × 24 = 168
w(5) = 7(2 + 1 + 1 + 1 + 2 + 6 + 1) = 7 × 14 = 98
w(6) = 7(5 + 4 + 2 + 3 + 0 + 6 + 2) = 7 × 22 = 154.
The splitting-signal {f1,0,t; t = 0 : 6} = v = w/7 = {7, 22, 17, 26, 24, 14, 22}.
Here, we denote by v and w the vectors of data v(t) and w(t), respectively.
2 3 2 3 2 3
1111111 0000000 0000000
6 0 0 0 0 0 0 07 6 1 1 1 1 1 1 17 6 0 0 0 0 0 0 07
6 7 6 7 6 7
6 0 0 0 0 0 0 07 6 0 0 0 0 0 0 07 6 0 0 0 0 0 0 07
6 7 6 7 6 7
6 0 0 0 0 0 0 0 7, [χ0,1,1 ] = 6 0 0 0 0 0 0 0 7, ..., [χ0,1,6 ] = 6 0 0 0 0 0 0 0 7.
[χ0,1,0 ] = 6 7 6 7 6 7
6 0 0 0 0 0 0 07 6 0 0 0 0 0 0 07 6 0 0 0 0 0 0 07
6 7 6 7 6 7
4 0 0 0 0 0 0 05 4 0 0 0 0 0 0 05 4 0 0 0 0 0 0 05
0000000 0000000 1111111
The numbered control points of seven rays for this projection are denoted
by the bullets, as shown below
0
• . .. . ..
1 • . .. . ..
2
• . .. . ..
(the angle of rays is 0◦ ).
.. .. .. .. .. .. ..
.......
6 • . .. . ..
7
• . .. . ..
Image Processing 275
Therefore, the splitting-signal {f0,1,t} = v = w/7 = {15, 11, 9, 16, 26, 33, 22}.
Figure 5.2 shows the plots of line-integrals w(t) and splitting-signals for the
(1, 0)- and (0, 1)-projections.
250 40 250 40
w0,1(t) f0,1,t w1,0(t) f1,0,t
200 200
30 30
150 150
20 20
100 100
10 10
50 50
0 0 0 0
0 2 4 6 t 0 2 4 6 t 0 2 4 6 t 0 2 4 6 t
FIGURE 5.2
Line-integrals w(t) and splitting-signals for the (0, 1)- and (1, 0)-projections.
2 3 2 3 2 3
1000000 0100000 0010000
6 0 0 0 0 0 0 17 61 0 0 0 0 0 07 60 1 0 0 0 0 07
6 7 6 7 6 7
6 0 0 0 0 0 1 07 60 0 0 0 0 0 17 61 0 0 0 0 0 07
6 7 6 7 6 7
6 0 0 0 0 1 0 0 7, [χ1,1,1 ] = 6 0 0 0 0 0 1 0 7, [χ1,1,2 ] = 6 0 0 0 0 0 0 1 7
[χ1,1,0 ] = 6 7 6 7 6 7
6 0 0 0 1 0 0 07 60 0 0 0 1 0 07 60 0 0 0 0 1 07
6 7 6 7 6 7
4 0 0 1 0 0 0 05 40 0 0 1 0 0 05 40 0 0 0 1 0 05
0100000 0010000 0001000
276 CHAPTER 5: TENSOR TRANSFORM METHOD
2 3 2 3 2 3
0001000 0000100 0000010
6 0 0 1 0 0 0 07 6 0 0 0 1 0 0 07 60 0 0 0 1 0 07
6 7 6 7 6 7
6 0 1 0 0 0 0 07 6 0 0 1 0 0 0 07 60 0 0 1 0 0 07
6 7 6 7 6 7
6 1 0 0 0 0 0 0 7, [χ1,1,4 ] = 6 0 1 0 0 0 0 0 7, [χ1,1,5 ] = 6 0 0 1 0 0 0 0 7
[χ1,1,3 ] = 6 7 6 7 6 7
6 0 0 0 0 0 0 17 6 1 0 0 0 0 0 07 60 1 0 0 0 0 07
6 7 6 7 6 7
4 0 0 0 0 0 1 05 4 0 0 0 0 0 0 15 41 0 0 0 0 0 05
0000100 0000010 0000001
2 3 2 3
0000001 1111111
60 0 0 0 0 1 0 7 61 1 1 1 1 1 1 7
6 7 6 7
60 0 0 0 1 0 0 7 61 1 1 1 1 1 1 7 5
6 7 6 7 X
[χ1,1,6 ] = 6 0 0 0 1 0 0 0 7 = 61 1 1 1 1 1 1 7 − [χ1,1,t ]. (5.4)
6 7 6 7
6 0 0 1 0 0 0 0 7 6 1 1 1 1 1 1 1 7 t=0
6 7 6 7
40 1 0 0 0 0 0 5 41 1 1 1 1 1 1 5
1000000 1111111
The composition of the last matrix by the first six matrices shows the
redundancy of the 2-D tensor transform, when the component f1,1,6 can be
calculated as
X 5
5 X 5
X 6
X 5
X
f1,1,6 = fn,m − f1,1,t = f1,0,t − f1,1,t .
n=0 m=0 t=0 t=0 t=0
We define and number the control points of the parallel rays for this pro-
jection by the bullets as
0
• . . . . . .
1• . . . . . .
2
• . . . . . .
(the angle of rays is − 45◦ ).
.. .. .. .. .. .. ..
. . . . . . .
5• . . . . . .
6 7 8 9 10 11 12
• • • • • • •
Seven masks of tensor functions χ1,1,t(n, m) with the parallel rays on which
the coefficients 1 are situated are shown in Figures 5.3–5.5. The set of all 14
rays is also shown in Figure 5.5.
The sums of the discrete image along these rays are denoted by vt = v1,1 (t),
where t = 0 : 12. One can notice that the components of the tensor transform
with the triplet-numbers (p, s, t) ∈ U (1, 1) can be calculated as follows:
f1,1,0 = v0 + v7 , f1,1,1 = v1 + v8 ,
f1,1,2 = v2 + v9 , f1,1,3 = v3 + v10 , (5.5)
f1,1,4 = v4 + v11 , f1,1,5 = v5 + v12 , f1,1,6 = v6 .
l(0) l(1)
0 0
0 l(7) 0
0.14 0.14
1 1 l(8)
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 4
0.71 0.71
5 5
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
l(2) l(3)
0 0
0 0
0.14 0.14
1 1
0.29 0.29
2 l(9) 2
y and m
y and m
0.43 0.43
3 3 l(10)
0.57 0.57
4 4
0.71 0.71
5 5
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.3
Parallel rays in the masks [χ1,1,t], t = 0 : 3, for the (1, 1)-projection.
l(4) l(5)
0 0
0 0
0.14 0.14
1 1
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 l(11) 4
0.71 0.71
5 5 l(12)
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.4
Parallel rays in the masks [χ1,1,t], t = 4, 5 for the (1, 1)-projection.
where v13 = 0. The sums of the image v(t) = v1,1,t can be calculated from the
integrals of the image f(x, y) along the corresponding geometrical rays,
t 1
l(t) = l1,1 (t) = (x, y); x + y = + , t = 0 : 12,
7 7
278 CHAPTER 5: TENSOR TRANSFORM METHOD
y and m
0.43 0.43
3 3 l(10)
0.57 0.57
4 4 l(11)
0.71 0.71
5 5 l(12)
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.5
Mask [χ1,1,6] and the set of arithmetical rays of the (1, 1)-projection.
v(t) √
w(t) = w1,1 (t) = ∆l = 7 2v(t), t = 0 : 12.
(∆x)2
√
Therefore v(t) = w(t)/(7 2), t = 0 : 12. The number of rays is calculated by
(1 + 1)(7 − 1) + 1 = 13.
For the given image f(x, y), the line-integrals equal
√ √
w(0)= 7√2(1) = 7√2
w(1)= 7√2(1 + 1) = 7√2 · 2
w(2)= 7√2(3 + 1 + 0) = 7√2 · 4
w(3)= 7√2(1 + 1 + 2 + 2) = 7√2 · 6
w(4)= 7√2(2 + 2 + 2 + 3 + 0) = 7√2 · 9
w(5)= 7√2(2 + 1 + 1 + 4 + 3 + 2) = 7√2 · 13
w(6)= 7√2(5 + 1 + 1 + 2 + 4 + 3 + 1) = 7√2 · 17
w(7)= 7√2(4 + 1 + 1 + 8 + 1 + 9) = 7√2 · 24
w(8)= 7√2(2 + 1 + 9 + 8 + 2) = 7√2 · 22
w(9)= 7√2(3 + 2 + 7 + 4) = 7√2 · 16
w(10) = 7√2(0 + 6 + 3) = 7√2 · 9
w(11) = 7√2(6 + 1) = 7√2 · 7
w(12) = 7 2(2) =7 2 · 2
The sums of the image along the corresponding arithmetical rays can be writ-
ten as the vector v = (1, 2, 4, 6, 9, 13, 17, 24, 22, 16, 9, 7, 2)0. The components of
Image Processing 279
Figure 5.6 shows the graphs of the line-integrals w(t), sums v(t), and splitting-
signal for the (1, 1)-projection.
250 25 30
w1,1(t) v1,1(t) f1,1,t
200 20 25
20
150 15
15
100 10
10
50 5 5
0 0 0
0 5 10 t 0 5 10 t 0 2 4 6
t
FIGURE 5.6
Line-integrals w(t), sums v(t), and splitting-signal of the (1, 1)-projection.
The masks of the tensor functions with seven triplet-numbers of U (1, 2) are
2 3 2 3 2 3
1000000 0100000 0010000
6 0 0 0 0 0 1 07 6 0 0 0 0 0 0 17 6 1 0 0 0 0 0 07
6 7 6 7 6 7
6 0 0 0 1 0 0 07 6 0 0 0 0 1 0 07 6 0 0 0 0 0 1 07
6 7 6 7 6 7
6 0 1 0 0 0 0 0 7, [χ1,2,1 ] = 6 0 0 1 0 0 0 0 7, [χ1,2,2 ] = 6 0 0 0 1 0 0 0 7,
[χ1,2,0 ] = 6 7 6 7 6 7
6 0 0 0 0 0 0 17 6 1 0 0 0 0 0 07 6 0 1 0 0 0 0 07
6 7 6 7 6 7
4 0 0 0 0 1 0 05 4 0 0 0 0 0 1 05 4 0 0 0 0 0 0 15
0010000 0001000 0000100
280 CHAPTER 5: TENSOR TRANSFORM METHOD
2 3 2 3 2 3
0001000 0000100 0000010
6 0 1 0 0 0 0 07 6 0 0 1 0 0 0 07 6 0 0 0 1 0 0 07
6 7 6 7 6 7
6 0 0 0 0 0 1 07 6 1 0 0 0 0 0 07 6 0 1 0 0 0 0 07
6 7 6 7 6 7
6 0 0 0 1 0 0 0 7, [χ1,2,4 ] = 6 0 0 0 0 0 1 0 7, [χ1,2,5 ] = 6 0 0 0 0 0 0 1 7,
[χ1,2,3 ] = 6 7 6 7 6 7
6 0 1 0 0 0 0 07 6 0 0 0 1 0 0 07 6 0 0 0 0 1 0 07
6 7 6 7 6 7
4 0 0 0 0 0 0 15 4 0 1 0 0 0 0 05 4 0 0 1 0 0 0 05
0000100 0000001 1000000
2 3 2 3
0000001 1111111
60 0 0 0 1 0 07 61 1 1 1 1 1 17
6 7 6 7
60 0 1 0 0 0 07 61 1 1 1 1 1 17 X 5
6 7 6 7
[χ1,2,6 ] = 66 1 0 0 0 0 0 0 7 = 61 1 1 1 1 1 17 −
7 6 7 [χ1,2,t ].
6 0 0 0 0 0 1 0 7 6 1 1 1 1 1 1 1 7 t=0
6 7 6 7
40 0 0 1 0 0 05 41 1 1 1 1 1 15
0100000 1111111
We define the control points of these rays by the bullets and number them
as shown below:
0 1
• 2• 3• 4 • 5• 6•
2 3
•
7 8 7
6 . . . . . • •7
. . . . 9 • 10 • 7
6
6 .
. . . . 11 • 12 • 7
6 7
6 . (angle of rays is − arctan 1/2 = −26.565◦ ).
. . . . 13 • 14 • 7
6 7
6
6 . 7
15 16 5
4 . . . . . • •
. . . . . 17 • 18 •
are also shown in Figure 5.8. The components of the tensor transform with
the triplet-numbers of the subset U (1, 2) can be calculated by
where variables vt = v1,2 (t) denote the sums of the discrete image along the
rays l(t), t = 0 : 18. Therefore, the system of equations can be written as
l(0) l(1)
0 0
0 l(7) 0
0.14 0.14 l(8)
1 1
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 l(14) 0.57
4 4 l(15)
0.71 0.71
5 5
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
l(2) l(3)
0 0
0 0
0.14 0.14
1 l(9) 1
0.29 0.29 l(10)
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 4
0.71 l(16) 0.71
5 5 l(17)
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.7
Four masks [χ1,2,t], t = 0 : 3, for the (1, 2)-projection.
˜ t 1
l(t) = l1,2 (t − 0.5) = {(x, y); x + 2y = + }, t = 0 : 18.
7 7
The relation between the line-integrals along the geometrical rays ˜l(t) and
the line-sums along the arithmetical rays l(t) is described by the following
system of linear equations:
√
w(t) = w(˜l(t)) = 7 5/2[v1,2 (t − 1) + v1,2 (t)], t = 0 : 18,
282 CHAPTER 5: TENSOR TRANSFORM METHOD
l(4) l(5)
0 0
0 0
0.14 0.14
1 1
0.29 0.29
2 l(11) 2
l(12)
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 4
0.71 0.71
5 5
0.86 l(18) 0.86
6 6 l(19)
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
y and m
0.43 0.43 l(12)
3 l(13) 3 l(13)
0.57 0.57 l(14)
4 4 l(15)
0.71 0.71 l(16)
5 5 l(17)
0.86 0.86 l(18)
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.8
Masks [χ1,2,t], t = 4 : 6, and the set of 19 arithmetical rays.
l(0)
0 l(6)
0
l(7)
0.14
y and m
1
0.29
2
0.43
3
0.57
4 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n
FIGURE 5.9
Four parallel rays of the (1, 2)-projection.
3 ˜l(14)
0.57 ˜l(15)
4 ˜l(16)
0.71 ˜l(17)
5 ˜l(18)
0.86
1
0 1 2 3 4 5 6
FIGURE 5.10
Geometrical rays for calculating line-integrals of the (1, 2)-projection.
The above Toeplitz matrix 19 × 19 has the triangle inverse matrix, and all
sums along the arithmetical rays are calculated by
v1,2 (0) 1 0 0 0 0 ··· 0 0 w1,2 (0)
v1,2 (1) −1 1 0 0 0 · · · 0 0 w1,2 (1)
v1,2 (2) 1 −1 1 0 0 · · · 0 0 w1,2 (2)
−1 1 −1 1 0 · · · 0 0 w1,2 (3)
v1,2 (3) 2
v1,2 (4) = √ 1 −1 1−1 1 · · · 0 0 w1,2 (4) .
7 5
.. .. .. .. .. .. . . .. .. ..
. . . . . . . . . .
v1,2 (17) −1 1 −1 1 −1 · · · 1 0 w1,2 (17)
v1,2 (18) 1 −1 1−1 1 · · · −1 1 w1,2 (18)
The required
√ sums v(t) of the discrete image fn,m are calculated by v(t) =
bt /(7 5/2), where the coefficients bt are calculated as follows:
b0 =w(0),
b1 =w(1) − b0 , (5.7)
bt =w(t) − bt−1 , t = 2, 3, . . . , 18.
For the given image f(x, y), the line-integrals are calculated by
w(0) = K(1) =K · 1
w(1) = K(1 + 1) =K · 2
w(2) = K(3 + 1 + 1) =K · 5
w(3) = K(1 + 3 + 1 + 1) = K · 6
284 CHAPTER 5: TENSOR TRANSFORM METHOD
w(4) = K(2 + 1 + 1 + 1 + 0) =K ·5
w(5) = K(2 + 2 + 2 + 1 + 2 + 0) =K ·9
w(6) = K(5 + 2 + 1 + 2 + 2 + 2 + 2) = K · 16
w(7) = K(5 + 1 + 1 + 1 + 2 + 3 + 2) = K · 15
w(8) = K(4 + 1 + 1 + 1 + 4 + 3 + 0) = K · 14
w(9) = K(4 + 1 + 1 + 2 + 4 + 3 + 0) = K · 15
w(10) = K(2 + 1 + 1 + 2 + 4 + 3 + 2) = K · 15
w(11) = K(2 + 1 + 1 + 8 + 4 + 3 + 2) = K · 21
w(12) = K(3 + 1 + 9 + 8 + 1 + 3 + 1) = K · 26
w(13) = K(3 + 2 + 9 + 8 + 1 + 9 + 1) = K · 33
w(14) = K(0 + 2 + 7 + 8 + 2 + 9) =K · 28
w(15) = K(0 + 6 + 7 + 4 + 2) =K · 19
w(16) = K(6 + 6 + 3 + 4) =K · 19
w(17) = K(6 + 1 + 3) =K · 10
w(18) = K(2 + 1) =K ·3
√
where K = 7 5/2. Therefore, the sums v(t) = K −1 w(t) − v(t − 1) of the
discrete image fn,m can be calculated as follows:
v(0) = K −1 w(0) =1 =1
v(1) = K −1 w(1) − v(0) = 2 − 1 = 1
v(2) = K −1 w(2) − v(1) = 5 − 1 = 4
v(3) = K −1 w(3) − v(2) = 6 − 4 = 2
v(4) = K −1 w(4) − v(3) = 5 − 2 = 3
v(5) = K −1 w(5) − v(4) = 9 − 3 = 6
v(6) = K −1 w(6) − v(5) = 16 − 6 = 10
v(7) = K −1 w(7) − v(6) = 15 − 10 = 5
v(8) = K −1 w(8) − v(7) = 14 − 5 = 9
v(9) = K −1 w(9) − v(8) = 15 − 9 = 6
v(10) = K −1 w(10) − v(9) = 15 − 6 = 9
v(11) = K −1 w(11) − v(10) = 21 − 9 = 12
v(12) = K −1 w(12) − v(11) = 26 − 12 = 14
v(13) = K −1 w(13) − v(12) = 33 − 14 = 19
v(14) = K −1 w(14) − v(13) = 28 − 19 = 9
v(15) = K −1 w(15) − v(14) = 19 − 9 = 10
v(16) = K −1 w(16) − v(15) = 19 − 10 = 9
v(17) = K −1 w(17) − v(16) = 10 − 9 = 1
v(18) = K −1 w(18) − v(17) = 3 − 1 = 2.
Figure 5.11 shows the graphs of the integrals w(t), sums v(t), and splitting-
signal for the (1, 2)-projection.
20 30
250
w1,2(t) v1,2(t) f1,2,t
25
200 15
20
150
10 15
100
10
5
50 5
0 0 0
0 5 10 15 t 0 5 10 15 t 0 2 4 6 t
FIGURE 5.11
Line-integrals w(t), sums v(t), and splitting-signal for the (1, 2)-projection.
Masks of the seven tensor functions with triplet-numbers of this subset are
2 3 2 3 2 3
1000000 0100000 0010000
6 0 0 0 0 1 0 07 6 0 0 0 0 0 1 07 6 0 0 0 0 0 0 17
6 7 6 7 6 7
6 0 1 0 0 0 0 07 6 0 0 1 0 0 0 07 6 0 0 0 1 0 0 07
6 7 6 7 6 7
6 0 0 0 0 0 1 0 7, [χ1,3,1 ] = 6 0 0 0 0 0 0 1 7, |χ1,3,2 ] = 6 1 0 0 0 0 0 0 7,
[χ1,3,0 ] = 6 7 6 7 6 7
6 0 0 1 0 0 0 07 6 0 0 0 1 0 0 07 6 0 0 0 0 1 0 07
6 7 6 7 6 7
4 0 0 0 0 0 0 15 4 1 0 0 0 0 0 05 4 0 1 0 0 0 0 05
0001000 0000100 0000010
2 3 2 3 2 3
0001000 0000100 0000010
6 1 0 0 0 0 0 07 6 0 1 0 0 0 0 07 6 0 0 1 0 0 0 07
6 7 6 7 6 7
6 0 0 0 0 1 0 07 6 0 0 0 0 0 1 07 6 0 0 0 0 0 0 17
6 7 6 7 6 7
|χ1,3,3 ] = 6
6 0 1 0 0 0 0 0 7, [χ1,3,4 ] = 6 0 0 1 0 0 0 0 7, [χ1,3,5 ] = 6 0 0 0 1 0 0 0 7,
7 6 7 6 7
6 0 0 0 0 0 1 07 6 0 0 0 0 0 0 17 6 1 0 0 0 0 0 07
6 7 6 7 6 7
4 0 0 1 0 0 0 05 4 0 0 0 1 0 0 05 4 0 0 0 0 1 0 05
0000001 1000000 0100000
2 3 2 3
0000001 1111111
60 0 0 1 0 0 07 61 1 1 1 1 1 17
6 7 6 7
61 0 0 0 0 0 07 61 1 1 1 1 1 17 X 5
6 7 6 7
[χ1,3,6 ] = 66 0 0 0 0 1 0 0 7 = 61 1 1 1 1 1 17 −
7 6 7 [χ1,3,t ].
6 0 1 0 0 0 0 0 7 6 1 1 1 1 1 1 1 7 t=0
6 7 6 7
40 0 0 0 0 1 05 41 1 1 1 1 1 15
0010000 1111111
286 CHAPTER 5: TENSOR TRANSFORM METHOD
The masks of these tensor functions are shown in Figures 5.12 and 5.13,
together with the rays passing through coefficients 1 of the masks.
l(0) l(1)
0 0
0 l(7) 0 l(8)
0.14 0.14
1 1
0.29 0.29
2 l(14) 2
y and m
y and m
0.43 0.43 l(15)
3 3
0.57 0.57
4 4
0.71 l(21) 0.71
5 5 l(22)
0.86 0.86
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
l(2) l(3)
0 0
0 0
0.14 l(9) 0.14
1 1 l(10)
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 l(16) 3 l(17)
0.57 0.57
4 4
0.71 0.71
5 l(23) 5
0.86 0.86 l(24)
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.12
Four masks [χ1,3,t], t = 0 : 3, and parallel rays for the (1, 3)-projection.
l(4) l(5)
0 0
0 0
0.14 0.14
1 l(11) 1
0.29 0.29 l(12)
2 2
y and m
y and m
0.43 0.43
3 3
0.57 l(18) 0.57
4 4 l(19)
0.71 0.71
5 5
0.86 0.86
6 l(25) 6 l(26)
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
0 l(6) 0
l(0) l(1) l(2) l(3) l(4) l(5)
l(6)
0 0
0.14 0.14 l(8)
1 1 l(10)
0.29 0.29 l(12)
2 l(13) 2
l(14)
y and m
y and m
0.43 0.43
3 3 l(16)
0.57 0.57 l(18)
4 l(20) 4
0.71 0.71 l(20)
5 5 l(22)
0.86 0.86 l(24)
6 6
1 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.13
Three masks [χ1,3,t], t = 4 : 6, and the set of 25 rays for the (1, 3)-projection.
where variables vt = v1,3 (t) denote the sums of the discrete image along the
corresponding rays l(t), t = 0 : 24. The system of equations can also be written
as
X3 X3
f1,3,t = vt+7m = v1,3,t+7m, t = 0 : 6,
m=0 m=0
elements,√that is, the length of intersection of the ray with each IE equals
∆l0,6 = 10/3∆x. The integrals along the geometrical rays 15, 16, and 17
can be calculated by the line-sums of the discrete image as
√
7 10
w(15)= w1,3 (15)= √3
[v(15) + v(14) + v(16)],
7 10
w(16)= w1,3 (16)= √3
[v(15) + v(16) + v(17)],
7 10
w(17)= w1,3 (17)= 3
[v(18) + v(16) + v(17)].
Similar equations hold for all integrals w(t) of the considered projections:
√
w(t) = w1,3 (t) = 7 10/3[v(t − 1) + v(t) + v(t + 1)], t = 0 : 24.
l(14)
0.43
l(15)
3 l(16)
l(17)
0.57
l(18)
4
y and m
0.71
5
0.86
6
1
0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n
FIGURE 5.14
Five parallel geometrical rays of the (1, 3)-projection.
The integrals of the image along these rays are denoted by w(t) = w(˜l(t)).
The corresponding system of equations for integrals w(t) is described by
√
7 10
w(t) = [v(t) + v(t − 1) + v(t − 2)], t = 0 : 24,
3
where it is assumed that v(−1) and v(−2) are 0. This system of equations can
Image Processing 289
3 ˜l(17)
˜l(18)
0.57 ˜l(19)
4 ˜l(20)
˜l(21)
0.71 ˜l(22)
5 ˜l(23)
˜l(24)
0.86
1
0 1 2 3 4 5 6
FIGURE 5.15
A set of geometrical rays for the (1, 3)-projection.
The above Toeplitz matrix 25 × 25 has the lower triangle inverse matrix
1 0 0 0 0 0 0 0 · · · 0 00
−1 1 0 0 0 0 0 0 · · · 0 00
0 −1 1 0 0 0 0 0 · · · 0 00
1 0 −1 1 0 0 0 0 · · · 0 00
−1 1 0 −1 1 0 0 0 · · · 0 00
A−1 = 0 −1 1 0 −1 1 0 0 · · · 0 00 .
(5.10)
1 0 −1 1 0 −1 1 0 · · · 0 00
.. .. .. .. .. .. .. .. . . . . .
. . . . . . . . . .. .. ..
1 0 −1 1 0 −1 1 0 · · · −1 10
−1 1 0 −1 1 0 −1 1 · · · 0 −1 1
Therefore, the sums v(t) of the discrete image fn,m are calculated by
v(0) = K −1 w(0) =1 =1
v(1) = K −1 w(1) − v(0)
` ´ =2 − 1 =1
v(2) = K −1 w(2) − `v(1) + v(0)´ = 5 − (1 + 1) =3
v(3) = K −1 w(3) − `v(2) + v(1)´ = 6 − (3 + 1) =2
v(4) = K −1 w(4) − `v(3) + v(2)´ = 8 − (2 + 3) =3
v(5) = K −1 w(5) − `v(4) + v(3)´ = 8 − (3 + 2) =3
v(6) = K −1 w(6) − `v(5) + v(4)´ = 13 − (3 + 3) = 7
v(7) = K −1 w(7) − `v(6) + v(5)´ = 13 − (7 + 3) = 3
v(8) = K −1 w(8) − `v(7) + v(6)´ = 13 − (3 + 7) = 3
v(9) = K −1 w(9) − v(8)
` + v(7) ´ = 13 − (3 + 3) = 7
v(10) = K −1 w(10) − `v(9) + v(8) ´ = 14 − (7 + 3) = 4
v(11) = K −1 w(11) − `v(10) + v(9) ´ = 16 − (4 + 7) = 5
v(12) = K −1 w(12) − `v(11) + v(10)´ = 13 − (5 + 4) = 4
v(13) = K −1 w(13) − `v(12) + v(11)´ = 13 − (4 + 5) = 4
v(14) = K −1 w(14) − `v(13) + v(12)´ = 13 − (4 + 4) = 5
v(15) = K −1 w(15) − `v(14) + v(13)´ = 22 − (5 + 4) = 13
v(16) = K −1 w(16) − `v(15) + v(14)´ = 30 − (13 + 5) = 12
v(17) = K −1 w(17) − `v(16) + v(15)´ = 28 − (12 + 13) = 3
v(18) = K −1 w(18) − `v(17) + v(16)´ = 24 − (3 + 12) = 9
v(19) = K −1 w(15) − `v(14) + v(17)´ = 28 − (9 + 3) = 16
v(20) = K −1 w(16) − `v(15) + v(18)´ = 33 − (16 + 9) = 8
v(21) = K −1 w(17) − `v(16) + v(19)´ = 34 − (8 + 16) = 10
v(22) = K −1 w(18) − `v(17) + v(20)´ = 21 − (10 + 8) = 3
v(23) = K −1 w(17) − `v(16) + v(21)´ = 14 − (3 + 10) = 1
v(24) = K −1 w(18) − v(17) + v(22) = 6 − (1 + 3) = 2.
Figure 5.16 shows the graphs of the line-integrals w(t), sums v(t), and the
splitting-signal for the (1, 3)-projection.
Masks of the tensor functions which are numbered by these triplets are:
292 CHAPTER 5: TENSOR TRANSFORM METHOD
20 30
250
w1,3(t) v1,3(t) f1,3,t
25
200 15
20
150
10 15
100
10
5
50 5
0 0 0
0 10 20 t 0 10 20 t 0 2 4 6 t
FIGURE 5.16
Line-integrals w(t), sums v(t), and splitting-signal for the (1, 3)-projection.
1000000 0 1 0 0 0 00 0 01 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 1 00 0 00 0 0 1 0
0 0 0 0 0 0 1 1 0 0 0 0 00 0 10 0 0 0 0
0 0 1 0 0 0 0 , [χ1,4,1] = 0 0 0 1 0 00 , [χ1,4,2] = 0 00 0 1 0 0 ,
[χ1,4,0] =
0 0 0 0 0 1 0 0 0 0 0 0 01 1 00 0 0 0 0
0 1 0 0 0 0 0 0 0 1 0 0 00 0 00 1 0 0 0
0000100 0 0 0 0 0 10 0 00 0 0 0 1
0001000 0 0 0 0 1 00 0 00 0 0 1 0
0 0 0 0 0 0 1 1 0 0 0 0 00 0 10 0 0 0 0
0 0 1 0 0 0 0 0 0 0 1 0 00 0 00 0 1 0 0
0 0 0 0 0 1 0 , [χ1,4,4] = 0 0 0 0 0 01 , [χ1,4,5] = 1 00 0 0 0 0 ,
[χ1,4,3] =
0 1 0 0 0 0 0 0 0 1 0 0 00 0 00 1 0 0 0
0 0 0 0 1 0 0 0 0 0 0 0 10 0 00 0 0 0 1
1000000 0 1 0 0 0 00 0 01 0 0 0 0
0 0 0 00 0 1 1 1 1 1 1 11
0 0 1 00 0 0 1 1 1 1 1 11
0 0 0 00 1 0 1 1 1 1 1 11 X 5
[χ1,4,6] = 0 1 0 00 0 0 =
1 1 1 1 1 11 −
[χ1,4,t].
0 0 0 01 0 0 1 1 1 1 1 11 t=0
1 0 0 00 0 0 1 1 1 1 1 11
0 0 0 10 0 0 1 1 1 1 1 11
l(18)
3 l(19)
l(20)
0.571 l(21)
l(22)
4 l(23)
l(24)
0.714 l(25)
l(26)
5 l(27)
l(28)
0.857 l(29)
l(30)
6
1
0 1 2 3 4 5 6
FIGURE 5.17
The set of 25 parallel rays for the (1, 4)-projection.
functions with the first three triplet-numbers of the subset U (1, −3) are
1 0 0 00 0 0 0100000 0010000
0 0 0 10 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0
0 0 0 00 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0
0 0 1 00 0 0 , [χ1,−3,1] = 0 0 0 1 0 0 0 , [χ1,−3,2] = 0 0 0 0 1 0 0 .
[χ1,−3,0] =
0 0 0 00 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
0 1 0 00 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0
0 0 0 01 0 0 0000010 0000001
As an example, Figure 5.18 shows the mask of the tensor function χ1,4,0
with the parallel rays of two different projections. Five rays of the (1, 4)-
projection are shown on the left, and three rays of the (1, −3)-projection are
shown on the right.
For the remaining four triplet-numbers, we also have the equality of masks,
[χ1,−3,t] = [χ1,4,t], t = 3, 4, 5, 6.
We can see that for the subsets U (1, 4) and U (1, −3), we have the same
masks of the tensor functions. The number of parallel rays for (1, −3)-
projection equals (1 + 3)6 + 1 = 25, which is less than 31. The set of all
rays for this projection is shown in Figure 5.19.
294 CHAPTER 5: TENSOR TRANSFORM METHOD
l(0)
0 0
0 l(7) 0
0.14 0.14
1 1
0.28 0.28
2 l(14) 2 l(0)
0.42 0.42
y and m
y and m
3 3
0.57 l(21) 0.57
4 4
0.71 0.71 l(−7)
5 5
0.85 l(28) 0.85
6 6
1 1
l(−14)
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.28 0.42 0.57 0.71 0.85 1 0 0.14 0.28 0.42 0.57 0.71 0.85 1
x and n x and n
FIGURE 5.18
The mask [χ1,4,0] with arithmetical rays of the (1, 4)- and (1, −3)-projections.
0
0
l(6)
0.142 l(5)
1 l(4)
l(3)
0.285 l(2)
l(1)
2
l(0)
0.428 l(−1)
y and m
l(−2)
3
l(−3)
0.571 l(−4)
l(−5)
4
l(−6)
0.714 l(−7)
l(−8)
5 l(−9)
0.857 l(−10)
l(−11)
6 l(−12)
1 l(−13)
l(−18) l(−17) l(−16) l(−15) l(−14)
0 1 2 3 4 5 6
0 0.142 0.285 0.428 0.571 0.714 0.857 1
x and n
FIGURE 5.19
The set of parallel rays for the (1, −3)-projection.
0 0
0 0
0.14 0.14
1 1
0.29 0.29 l(2)
l(1)
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57 l(−5)
4 l(−6) 4
0.71 0.71
5 5
0.86 0.86
6 6 l(−12)
1 l(−13) 1
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
0 0
0 0
0.14 0.14 l(4)
1 l(3) 1
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 3 l(−3)
0.57 l(−4) 0.57
4 4
0.71 0.71
5 5
0.86 0.86 l(−10)
l(−11)
6 6
1 l(−18) 1 l(−17)
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.20
Masks [χ1,4,t], t = 1 : 4, and the rays of the (1, −3)-projection.
where the sums of the discrete image along the rays are denoted by vt =
v(t) = v1,−3 (t), t = 6 : −1 : −18. This system of linear equations can also be
written as follows:
X X
f1,4,t = vt−7m = v1,−3,t−7m, t = 0 : 6.
m m
296 CHAPTER 5: TENSOR TRANSFORM METHOD
0 0
0 0 l(6)
0.14 l(5) 0.14
1 1
0.29 0.29
2 2
l(−1)
y and m
y and m
0.43 l(−2) 0.43
3 3
0.57 0.57
4 4
0.71 0.71 l(−8)
5 l(−9) 5
0.86 0.86
6 6
1 l(−16) 1 l(−15)
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.21
Two masks [χ1,4,t], t = 5, 6, and the rays of the (1, −3)-projection.
As in the (1, 3) case, we consider the shifted set of the rays, l(t) → l(t − 1),
as the set of 25 geometrical rays
n t 2o
˜
l(t) = l1,−3 (t − 1) = (x, y); x − 3y = − , t = 6 : −1 : −18,
7 7
which are shown in Figure 5.22.
For the line-integrals, we obtain the system of equations, which is similar
to the system described for the (1, 3)-projection,
√
7 10 h i
w(t) = w(˜ l(t)) = v(t) + v(t − 1) + v(t − 2) , t = 6 : −1 : −18, (5.14)
3
where v(−19) = v(−20) = 0. The required sums √ v(t) of the discrete image
fn,m can therefore be defined as v(t) = 3bt /(7 10), where the components bt
are calculated recursively by
b−18 =w(−18), b−17 = w(−17) − b−18 ,
b−16 =w(−16) − (b−17 + b−18 ), (5.15)
bt =w(t) − (bt−1 + bt−2 ), t = −15, −14, · · · , 6.
The line-integrals w(t) for the given image f(x, y) can be calculated by
w(6) = K(5 + 2 + 2) =K ·9
w(5) = K(4 + 2 + 2 + 1) =K ·9
w(4) = K(4 + 1 + 2 + 1 + 3) =K · 11
w(3) = K(4 + 1 + 1 + 1 + 3 + 1) =K · 11
w(2) = K(2 + 1 + 1 + 2 + 3 + 1 + 1) = K · 11
w(1) = K(2 + 1 + 1 + 2 + 1 + 1 + 1) = K ·9
w(0) = K(2 + 1 + 1 + 2 + 1 + 1 + 1) = K ·9
w(−1) = K(3 + 1 + 1 + 1 + 1 + 1 + 1) = K ·9
w(−2) = K(3 + 1 + 1 + 1 + 2 + 1 + 1) = K · 10
w(−3) = K(3 + 1 + 1 + 1 + 2 + 2 + 1) = K · 11
w(−4) = K(0 + 1 + 1 + 2 + 2 + 2 + 0) = K ·8
w(−5) = K(0 + 2 + 1 + 2 + 4 + 2 + 0) = K · 11
w(−6) = K(0 + 2 + 9 + 2 + 4 + 3 + 0) = K · 20
Image Processing 297
0.14 ˜l(6)
˜l(5)
1 ˜l(4)
0.29 ˜l(3)
˜l(2)
2 ˜l(1)
0.43 ˜l(0)
˜l(−1)
y and m
3 ˜l(−2)
0.57 ˜l(−3)
˜l(−4)
4 ˜l(−5)
0.71 ˜l(−6)
˜l(−7)
5 ˜l(−8)
0.86 ˜l(−9)
˜l(−10)
6 ˜l(−11)
1 ˜l(−12)
˜l(−18) ˜l(−17) ˜l(−16) ˜l(−15) ˜l(−14) ˜l(−13)
0 1 2 3 4 5 6
FIGURE 5.22
The set of geometrical rays for the (1, −3)-projection.
w(−7) = K(6 + 2 + 9 + 8 + 4 + 3 + 2) = K · 34
w(−8) = K(6 + 6 + 9 + 8 + 4 + 3 + 2) = K · 38
w(−9) = K(6 + 6 + 7 + 8 + 4 + 3 + 2) = K · 36
w(−10) = K(2 + 6 + 7 + 8 + 4 + 3 + 0) = K · 30
w(−11) = K(2 + 1 + 7 + 8 + 1 + 3 + 0) = K · 22
w(−12) = K(2 + 1 + 3 + 8 + 1 + 3 + 0) = K · 18
w(−13) = K(1 + 3 + 4 + 1 + 3 + 2) = K · 14
w(−14) = K(3 + 4 + 2 + 3 + 2) = K · 14
w(−15) = K(4 + 2 + 9 + 2) = K · 17
w(−16) = K(2 + 9 + 1) = K · 12
w(−17) = K(9 + 1) = K · 10
w(−18) = K(1) =K · 1
√
where K = 7 10/3.
The sums v(t) of the discrete image fn,m are calculated as follows:
v(−18) = K −1w(−18) =1 =1
v(−17) = K −1w(−17) − v(−18) = 10 − 1 =9
v(−16) = K −1w(−16) − [v(−17) + v(−18)] = 12 − [9 + 1] = 2
v(−15) = K −1w(−15) − [v(−16) + v(−17)] = 17 − [2 + 9] = 6
v(−14) = K −1w(−14) − [v(−15) + v(−16)] = 14 − [6 + 2] = 6
v(−13) = K −1w(−13) − [v(−14) + v(−15)] = 14 − [6 + 6] = 2
298 CHAPTER 5: TENSOR TRANSFORM METHOD
Figure 5.23 shows the graphs of the integrals w(t), sums v(t), and splitting-
signal for the (1, −3)-projection.
300 20 30
w1,4(t) v1,4(t) f1,4,t
250 25
15
200 20
150 10 15
100 10
5
50 5
0 0 0
6 1 −4 −9 −14 t 6 1 −4 −9 −14 t 0 2 4 6 t
FIGURE 5.23
Line-integrals w(t), sums v(t), and splitting-signal of the (1, −3)-projection.
Image Processing 299
Remark 5.1 To work with only nonnegative numbers for control points, we
consider the transformation t → 6 − t,
6 5 4 3 2 1 0
• • • • • • •
9• 8• 7• . . . .
12 11 10
• • • . . . .
15 14 13
• • • . . . . (angle of rays is tan−1 (1/3) = 18.435◦).
18 17 16
• • • . . . .
21 20 19
• • • . . . .
24 23 22
• • • . . . .
With such numbering of the control points, the set of 25 geometrical rays of
the (1, −3)-projection in (5.12) can be written as
t 5
l(t) = l1,−3 (6 − t) = (x, y); x − 3y = − + .
7 7
Therefore, the system of equations in (5.14) can be written as
h i
w(t) = w(˜ l(t)) = K v(t) + v(t + 1) + v(t + 2) , t = 0 : 24, (5.16)
where v(25) = v(26) = 0. The system of equations in (5.15) for the coefficients
bt = Kv(t) is described by
b24 = w(24),
b23 = w(23) − b24 ,
(5.17)
b22 = w(22) − (b23 + b24 ),
bt = w(t) − (bt+1 + bt+2 ), t = 21, 20, · · · , 1, 0.
Because (1, 5 − 7) = (1, −2), the functions χ1,5,t equal χ1,−2,t , for t =
0 : 6. Therefore, to reduce the number of rays from (1 + 5)6 + 1 = 37 to
(1+|−2|)6+1 = 19, we consider the direction of the rays, which is determined
by the (1, −2)-projection. As an example, Figure 5.24 shows the mask of the
tensor function χ1,5,0 with the parallel rays of two different projections. Six
l(0)
0 0
0 l(7) 0
0.14 0.14
1 1
0.28 l(14) 0.28
2 2
0.42 0.42
y and m
y and m
3 l(21) 3
0.57 0.57 l(0)
4 4
l(28)
0.71 0.71
5 5
0.85 l(35) 0.85
6 6
1 1
l(−7)
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.28 0.42 0.57 0.71 0.85 1 0 0.14 0.28 0.42 0.57 0.71 0.85 1
x and n x and n
FIGURE 5.24
The mask [χ1,5,0] with two different sets of parallel rays.
rays of the (1, 5)-projection are shown on the left mask, and two rays of the
(1, −2)-projection are shown on the right mask. The set of parallel rays for
the (1, −2)-projection is shown in Figure 5.25.
The control points of parallel rays of the (1, 5)-projection are numbered
Image Processing 301
0
˜l(6)
0.14
˜l(5)
1
˜l(4)
0.29
˜l(3)
2
˜l(2)
0.43
˜l(1)
y and m
3
˜l(0)
0.57
˜l(−1)
4
˜l(−2)
0.71
˜l(−3)
5
˜l(−4)
0.86
˜l(−5)
6
˜l(−6)
1
˜l(−12) ˜l(−11) ˜l(−10) ˜l(−9) ˜l(−8) ˜l(−7)
0 1 2 3 4 5 6
FIGURE 5.25
The set of parallel rays for the (1, −2)-projection.
and located as
0
• 1 • 2• 3• 4 • 5• 6•
2 3
6 −2 • −1 • . . . . . 7
6 −4 −3 7
6 −6 • −5 • . . . . . 7
6 7
6 •
6 −8 −7 • . . . . . 7
7 (angle of rays is arctan(1/2) = 26.5651◦ ).
6 −10 • −9 • . . . . . 7
6 7
4 • • . . . . .5
−12 −11
• • . . . . .
where the sums of the discrete image along the rays are denoted by vt =
v(t) = v1,−2 (t), t = 6 : −1 : −12. The above system of linear equations can be
302 CHAPTER 5: TENSOR TRANSFORM METHOD
0 0
0 0
0.14 0.14
1 1
0.29 0.29
2 2 l(2)
y and m
y and m
0.43 l(1) 0.43
3 3
0.57 0.57
4 4
0.71 0.71
5 5
0.86 0.86 l(−5)
6 l(−6) 6
1 1
0 1 2 3 4 5 6 0 1 l(−12)
2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
0 0
0 0
0.14 0.14
1 1 l(4)
0.29 l(3) 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 4
0.71 0.71 l(−3)
5 l(−4) 5
0.86 0.86
6 6
1 1
0 1 2 l(−11)
3 4 5 6 0 1 2 3 l(−10)
4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.26
Masks [χ1,5,t], t = 1 : 4, and parallel rays of the (1, −2)-projection.
0 0
0 0 l(6)
0.14 l(5) 0.14
1 1
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57 l(−1)
4 l(−2) 4
0.71 0.71
5 5
0.86 0.86
6 6
1 1
0 1 2 3 4 l(−9)
5 6 0 1 2 3 4 5 l(−8)
6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.27
Masks [χ1,5,t], t = 5, 6, and parallel rays of the (1, −2)-projection.
written as
3
X 3
X
f1,5,t = vt−7m = v1,−2,t−7m, t = 0 : 6,
m=0 m=0
shifted set of the rays, l(t) → l(t − 0.5), to be the set of 19 geometrical rays
˜ t 1
l(t) = l1,−2 (t − 0.5) = (x, y); x − 2y = − , t = 6 : −1 : −12.
7 7
These rays are shown in Figure 5.28. For this set of geometrical rays, the
0
0
0.142 l(6)
1 l(5)
0.285 l(4)
2 l(3)
0.428 l(2)
y and m
3 l(1)
0.571 ˜
l(0)
4 ˜
l(−1)
0.714 ˜
l(−2)
5 ˜
l(−3)
0.857 ˜
l(−4)
6 ˜
l(−5)
1 ˜
l(−6)
l(−12) l(−11) l(−10) l(−9) l(−8) l(−7)
0 1 2 3 4 5 6
0 0.142 0.285 0.428 0.571 0.714 0.857 1
x and n
FIGURE 5.28
The set of geometrical rays for the (1, −2)-projection.
w(6) = K(5 + 2) =K ·7
w(5) = K(4 + 2 + 2) =K ·8
w(4) = K(4 + 1 + 2 + 1) =K ·8
w(3) = K(2 + 1 + 1 + 1 + 3) =K ·8
w(2) = K(2 + 1 + 1 + 2 + 3 + 1) =K · 10
w(1) = K(3 + 1 + 1 + 2 + 1 + 1 + 1) = K · 10
w(0) = K(3 + 1 + 1 + 1 + 1 + 1 + 1) = K ·9
304 CHAPTER 5: TENSOR TRANSFORM METHOD
w(−1) = K(0 + 1 + 1 + 1 + 2 + 1 + 1) = K · 7
w(−2) = K(0 + 2 + 1 + 2 + 2 + 2 + 1) = K · 10
w(−3) = K(6 + 2 + 9 + 2 + 4 + 2 + 0) = K · 25
w(−4) = K(6 + 6 + 9 + 8 + 4 + 3 + 0) = K · 36
w(−5) = K(2 + 6 + 7 + 8 + 4 + 3 + 2) = K · 32
w(−6) = K(2 + 1 + 7 + 8 + 4 + 3 + 2) = K · 27
w(−7) = K(1 + 3 + 8 + 1 + 3 + 0) = K · 16
w(−8) = K(3 + 4 + 1 + 3 + 0) = K · 11
w(−9) = K(4 + 2 + 3 + 2) = K · 11
w(−10) = K(2 + 9 + 2) = K · 13
w(−11) = K(9 + 1) = K · 10
w(−12) = K(1) =K · 1
√
where K = 7 5/2. The sums v(t) of the image fn,m are calculated by
v(−12) = K −1 w(−12) =1 =1
v(−11) = K −1 w(−11) − v(−12) = 10 − 1 = 9
v(−10) = K −1 w(−10) − v(−11) = 13 − 9 = 4
v(−9) = K −1 w(−9) − v(−10) = 11 − 4 = 7
v(−8) = K −1 w(−8) − v(−9) = 11 − 7 = 4
v(−7) = K −1 w(−7) − v(−8) = 16 − 4 = 12
v(−6) = K −1 w(−6) − v(−7) = 27 − 12 = 15
v(−5) = K −1 w(−5) − v(−6) = 32 − 15 = 17
v(−4) = K −1 w(−4) − v(−5) = 36 − 17 = 19
v(−3) = K −1 w(−3) − v(−4) = 25 − 19 = 6
v(−2) = K −1 w(−2) − v(−3) = 10 − 6 = 4
v(−1) = K −1 w(−1) − v(−2) = 7 − 4 = 3
v(0) = K −1 w(0) − v(−1) =9 − 3 =6
v(1) = K −1 w(1) − v(0) = 10 − 6 = 4
v(2) = K −1 w(2) − v(1) = 10 − 4 = 6
v(3) = K −1 w(3) − v(2) =8 − 6 =2
v(4) = K −1 w(4) − v(3) =8 − 2 =6
v(5) = K −1 w(5) − v(4) =8 − 6 =2
v(6) = K −1 w(6) − v(5) = 7 − 2 = 5.
The components of the splitting-signal {f1,5,t } are calculated by
Figure 5.29 shows the graphs of the line-integrals w(t), sums v(t), and the
splitting-signal for the (1, −2)-projection.
To avoid the negative numbering of rays, or control points, we consider
Image Processing 305
−1 20
w1,5(t) v1,5(t) 30
f1,5,t
6
15 25
−16
20
−11 10 15
−6 10
5
−1 5
6 0 0
6 −1 −6 −11 t 6 −1 −6 −11 t 0 2 4 6 t
FIGURE 5.29
Line-integrals w(t), sums v(t), and splitting-signal of the (1, 5)-projection.
the transformation t → 6 − t,
6
• 5 • 4• 3• 2 • 1• 0•
2 3
6 8• 7• . . . . . 7
6 10 9 7
6 • • . . . . .7
6 12 11 7
6 • • . . . . .7
6 14 13 7 (angle of rays is tan−1 (1/2) = 26.5651◦ ).
6 • • . . . . .7
6 16 15 7
4 • • . . . . .5
18 17
• • . . . . .
where v(19) = 0. The system of equations (5.21) for calculating the coefficients
bt = Kv(t) is described by
b18 = w(18),
b17 = w(17) − b18 ,
(5.23)
b16 = w(16) − b17 ,
bt = w(t) − bt+1 , t = 15, 14, · · · , 0,
This numbering was considered when plotting the integrals w(t) and sums
v(t) in Figure 5.29. Data {w(6), w(5), w(4), ..., w(−11), w(−12)} and {v(6),
v(5), v(4), ..., v(−11), v(−12)} were plotted versus time-points 0, 1, 2, ..., 17, 18.
306 CHAPTER 5: TENSOR TRANSFORM METHOD
Masks of the tensor functions χ1,6,t with triplet-numbers of this subset are
1 0 0 00 0 0 0100000 0010000
0 1 0 00 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0
0 0 1 00 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0
0 0 0 10 0 0 , [χ1,6,1] = 0 0 0 0 1 0 0 , [χ1,6,2] = 0 0 0 0 0 1 0 ,
[χ1,6,0] =
0 0 0 01 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
0 0 0 00 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
0 0 0 00 0 1 1000000 0100000
0 0 0 10 0 0 0000100 0000010
0 0 0 01 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1
0 0 0 00 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0
0 0 0 00 0 1 , [χ1,6,4] = 1 0 0 0 0 0 0 , [χ1,6,5] = 0 1 0 0 0 0 0 ,
[χ1,6,3] =
1 0 0 00 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0
0 1 0 00 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0
0 0 1 00 0 0 0001000 0000100
0000001 1111111
1 0 0 0 0 0 0 1 1 1 1 1 1 1
0 1 0 0 0 0 0 1 1 1 1 1 1 1 5
X
[χ1,6,6] = 0 0 1 0 0 0 0 = 1 1 1 1 1 1 1 −
[χ1,6,t].
0 0 0 1 0 0 0 1 1 1 1 1 1 1 t=0
0 0 0 0 1 0 0 1 1 1 1 1 1 1
0000010 1111111
To reduce the number of parallel rays, along which the corresponding compo-
nents f1,6,t of the tensor transform are defined (see Figure 5.30), we consider
the parallel rays of the (1, −1)-projection. The masks of the tensor functions
for these two projections are the same, i.e., [χ1,6,t] = [χ1,−1,t], for t = 0 : 6.
The use of the (1, −1)-projection allows for reducing the number of rays from
(1 + 6)6 + 1 = 43 to (1 + | − 1|)6 + 1 = 13.
As an example, Figure 5.31 shows the mask of the tensor function χ1,5,0
with the parallel arithmetical rays of two different projections. Seven rays of
the (1, 6)-projection are shown in the mask on the left, and one ray of the
(1, −1)-projection is shown in the same mask on the right. The set of 13 rays
for the (1, −1)-projection is shown in Figure 5.32.
Image Processing 307
0.14 l(10)
1
l(14)
0.29
l(18)
2
0.43 l(22)
y and m
3
l(26)
0.57
l(30)
4
0.71 l(34)
5
l(38)
0.86
l(42)
6
1
0 1 2 3 4 5 6
FIGURE 5.30
The set of parallel rays for the (1, 6)-projection.
l(0)
0 0
0 l(7) 0
0.14 0.14
1 l(14) 1
0.29 0.29
2 2
0.43 l(21) 0.43
y and m
y and m
3 3
0.57 l(28) 0.57
4 4
0.71 l(35) 0.71
5 5
0.86 0.86
6 l(42) 6
1 1 l(0)
0 1 2 3 4 5 6 0 1 2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.31
The mask |χ01,6,0| with two different sets of arithmetical rays.
0.14 l(6)
0.29 l(5)
0.43 l(4)
y and m
0.57 l(3)
0.71 l(2)
0.86 l(1)
1 l(0)
l(−6) l(−5) l(−4) l(−3) l(−2) l(−1)
0 1 2 3 4 5 6
FIGURE 5.32
The set of parallel rays for the (1, −1)-projection.
f1,6,0 =v0 ,
f1,6,1 =v1 + v−6 , f1,6,2 = v2 + v−5 ,
(5.25)
f1,6,3 =v3 + v−4 , f1,6,4 = v4 + v−3 ,
f1,6,5 =v5 + v−2 , f1,6,6 = v6 + v−1 ,
where the sums of the discrete image along the rays are denoted by vt =
v(t) = v1,−1 (t), t = 6 : −1 : −6. This complete system of linear equations for
calculating the components of the 2-D tensor transform with triplet-numbers
of the subset U (1, 6) can be written as
where v−7 = 0. As in the (1, 1)-projection case, the line-sums v(t) of the
discrete image fn,m can be calculated from the line-integrals w(t). The set of
geometrical rays coincides with the set of arithmetical rays. Each ray intersects
Image Processing 309
0 0
0 0
0.14 0.14
1 1
0.29 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 4
0.71 0.71 l(2)
5 5
0.86 l(1) 0.86
6 6
1 1
0 l(−6)
1 2 3 4 5 6 0 1 l(−5)
2 3 4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
0 0
0 0
0.14 0.14
1 1
0.29 0.29
2 2
y and m
y and m
0.43 0.43 l(4)
3 3
0.57 l(3) 0.57
4 4
0.71 0.71
5 5
0.86 0.86
6 6
1 1
0 1 2 l(−4)
3 4 5 6 0 1 2 3 l(−3)
4 5 6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.33
Masks [χ1,6,t], t = 1 : 4, and rays of the (1, −1)-projection.
0 0
0 0
0.14 0.14 l(6)
1 1
0.29 l(5) 0.29
2 2
y and m
y and m
0.43 0.43
3 3
0.57 0.57
4 4
0.71 0.71
5 5
0.86 0.86
6 6
1 1
0 1 2 3 4 l(−2)
5 6 0 1 2 3 4 5 l(−1)
6
0 0.14 0.29 0.43 0.57 0.71 0.86 1 0 0.14 0.29 0.43 0.57 0.71 0.86 1
x and n x and n
FIGURE 5.34
Masks [χ1,6,t], t = 5, 6 and rays of the (1, −1)-projection.
√ √
the image element along
√ the path of length ∆l = 2∆x = 2/7. Therefore,
w(t) = w1,−1 (t) = 7 2v(t), or
1
v(t) = √ w(t), t = 6 : −1 : −6. (5.26)
7 2
310 CHAPTER 5: TENSOR TRANSFORM METHOD
For the given image f(x, y), the line-integrals w(t) are calculated by
√ √
w(6) = 7√2(5) = 7√2 · 5
w(5) = 7√2(2 + 4) = 7√2 · 6
w(4) = 7√2(2 + 1 + 2) = 7√2 · 5
w(3) = 7√2(1 + 1 + 1 + 3) = 7√2 · 6
w(2) = 7√2(3 + 2 + 1 + 1 + 0) = 7√2 · 7
w(1) = 7√2(1 + 1 + 1 + 1 + 2 + 6) = 7√2 · 12
w(0) = 7√2(1 + 1 + 2 + 2 + 9 + 6 + 2) = 7√2 · 23
w(−1) = 7√2(1 + 2 + 4 + 8 + 7 + 1) = 7√2 · 23
w(−2) = 7√2(0 + 3 + 4 + 8 + 3) = 7√2 · 18
w(−3) = 7√2(2 + 3 + 1 + 4) = 7√2 · 10
w(−4) = 7√2(0 + 3 + 2) = 7√2 · 5
w(−5) = 7√2(2 + 9) = 7√2 · 11
w(−6) = 7 2(1) = 7 2 · 1.
The sums v(t), t = 6 : −1 : −6, of the image along the corresponding arith-
metical rays compose the vector v = (5, 6, 5, 6, 7, 12, 23, 23, 18, 10, 5, 11, 1)0,
and the components of the splitting-signal {f1,6,t; t = 0 : 6} are calculated by
f1,6,0 =v(0) = 23
f1,6,1 =v(1) + v(−6) =12 + 1 = 13
f1,6,2 =v(2) + v(−5) =7 + 11 = 18
f1,6,3 =v(3) + v(−4) =6 + 5 = 11
f1,6,4 =v(4) + v(−3) =5 + 10 = 15
f1,6,5 =v(5) + v(−2) =6 + 18 = 24
f1,6,6 =v(6) + v(−1) =5 + 23 = 28.
Figure 5.35 shows the graphs of the line-integrals w(t), sums v(t), and
splitting-signal for the (1, −1)-projection. The control points can be numbered
30
250 25
w1,6(t) v1,6(t) f1,6,t
25
200 20
20
150 15
15
100 10
10
50 5 5
0 0 0
6 3 0 −3 −6 t 6 3 0 −3 −6 t 0 2 4 6 t
FIGURE 5.35
Line-integrals w(t), sums v(t), and splitting-signal for the (1, −1)-projection.
Image Processing 311
% ----------------------------------------------------
% call: example7x7_inverseDTT.m
% The inverse 7x7-point 2-D DTT, for Example 5.1
% A.M. Grigoryan, November 2, 2011
% ----------------------------------------------------
% Set of generators is considered to be calculated as
% J77=ones(2,8); J77(:,1)=[0 1]; J77(2,2:8)=0:6;
DTT_ofimage=[15 11 9 16 26 33 22
7 22 17 26 24 14 22
25 24 20 15 16 15 17
15 20 19 12 17 20 29
19 20 23 11 17 23 19
17 6 17 19 26 22 25
18 19 24 30 16 13 12
23 13 18 11 15 24 28];
% Eq 5.2 of the inverse 2-D discrete tensor transform:
image_fromTT=zeros(7,7);
for n1=0:6
n=n1+1;
for m1=0:6
m=m1+1;
image_fromTT(n,m)=DTT_ofimage(1,n);
col=m1-n1;
for p=2:8
col=col+n1;
if col>=7 col=col-7; end
image_fromTT(n,m)=image_fromTT(n,m)+...
DTT_ofimage(p,col+1);
end
end
end
image_power=sum(DTT_ofimage(1,:));
image_fromTT=(image_fromTT-image_power)/7
% 1 1 3 1 2 2 5
% 1 1 1 2 1 1 4
% 0 2 2 1 1 1 2
% 2 3 4 2 1 1 3
% 0 3 4 8 9 2 0
% 2 3 1 8 7 6 6
% 1 9 2 4 3 1 2
% ----------------------------------------------------
TABLE 5.1
Projection data for reconstruction of the discrete image 7 × 7
(p, s) n(p, s) masks in U (p, s)
(1, 0) 7 (1, 0, 0), (1, 0, 1), (1, 0, 2), (1, 0, 3), (1, 0, 4), (1, 0, 5), (1, 0, 6)
(1, 1) 13 (1, 1, 0), (1, 1, 1), (1, 1, 2), (1, 1, 3), (1, 1, 4), (1, 1, 5), (1, 1, 6)
(1, 2) 19 (1, 2, 0), (1, 2, 1), (1, 2, 2), (1, 2, 3), (1, 2, 4), (1, 2, 5), (1, 2, 6)
(1, 3) 25 (1, 3, 0), (1, 3, 1), (1, 3, 2), (1, 3, 3), (1, 3, 4), (1, 3, 5), (1, 3, 6)
(1, 4) 25 (1, 4, 0), (1, 4, 1), (1, 4, 2), (1, 4, 3), (1, 4, 4), (1, 4, 5), (1, 4, 6)
(1, 5) 19 (1, 5, 0), (1, 5, 1), (1, 5, 2), (1, 5, 3), (1, 5, 4), (1, 5, 5), (1, 5, 6)
(1, 6) 13 (1, 6, 0), (1, 6, 1), (1, 6, 2), (1, 6, 3), (1, 6, 4), (1, 6, 5), (1, 6, 6)
(0, 1) 7 (0, 1, 0), (0, 1, 1), (0, 1, 2), (0, 1, 3), (0, 1, 4), (0, 1, 5), (0, 1, 6)
138 [122]
or line-integrals w(t) = wp,s (t) of the image f(x, y), to reconstruct 49 values
of the discrete image fn,m . Equations of the geometrical rays for the image
7 × 7 are given in Table 5.2.
TABLE 5.2
Equations of geometrical rays for the image 7 × 7 (case A)
(p, s) A-rays t → t − t0 G-rays ˜
l(t) = l(t − t0 ) t
(1, 0) l1,0 (t) t→t x = t/7 + 1/14 0:6
(1, 1) l1,1 (t) t→t x + y = t/7 + 1/7 0 : 12
(1, 2) l1,2 (t) t → t − 1/2 x + 2y = t/7 + 1/7 0 : 18
(1, 3) l1,3 (t) t→t−1 x + 3y = t/7 + 1/7 0 : 24
(1, 4) l1,−3 (t) t→t−1 x − 3y = t/7 − 2/7 6 : −1 : −18
(1, 5) l1,−2 (t) t → t − 1/2 x − 2y = t/7 − 1/7 6 : −1 : −12
(1, 6) l1,−1 (t) t→t x − y = t/7 6 : −1 : −6
(0, 1) l0,1 (t) t→t y = t/7 + 1/14 0:6
Equations for solving the convolution equations are given in Table 5.3.
b0 = w(0),
√
bt = w(t) − bt−1 t = 0 : 18
w(t) = 7 310 [v(t) + v(t − 1) + v(t − 2)] v(t) = 7√b10/3
P
(1, 3) m vn+7m t
b0 = w(0),
√
bt = w(t) − (bt−1 + bt−2 ) t = 0 : 24
w(t) = 7 310 [v(t) + v(t − 1) + v(t − 2)] v(t) = 7√b10/3
P
(1, 4) m vn−7m t
b−18 = w(−18),
√
bt = w(t) − (bt−1 + bt−2 ) t = −18 : 6
w(t) = 7 2 5 [v(t) + v(t − 1)] v(t) = 7√b5/2
P
(1, 5) m vn−7m t
b−12 = w(−12),
√ bt = w(t) − bt−1 t = −12 : −1 : 6
P 1
(1, 6) m vn−7m w(t) = 7 2v(t), t = −6 : 6 v(t) = 7√ 2
w(t)
1
(0, 1) vn wt = 7vt v(t) = 7 w(t)
image f (x, y)
1
Image composition: Random rectangles
? 2
3
Line-integrals of the (p, s)-projection Set of generators
JN,N = {(p, s)}
?
4
Transform of G-rays into A-rays, w → v
?
5
Calculation of the splitting-signal {fp,s,t }
?
6
Inverse 2-D discrete tensor transform
?
reconstructed image fn,m
FIGURE 5.36
Block-diagram of the reconstruction of the image f(x, y) composed of rectan-
gles on the Cartesian grid N × N placed in the square [0, 1] × [0, 1].
The value of fn,m is defined as the sum of intensities of rectangles that cover
the (n, m)-th IE.
As an example, Figure 5.37 shows the gray-scale image of size 257 × 257,
which is composed of ten rectangles (on the left), and its discrete representa-
tion (on the right), after the image reconstruction. The image is the sum of
these rectangles.
The program generates data of random rectangles in the integer form as
shown in Table 5.4, for the image shown in the figure.
The coordinates of these rectangles are used for the discrete grid N × N,
by normalizing them, xk = x0k /N, yk = yk0 /N, ∆xk = ∆x0k /N, ∆yk = ∆yk0 /N,
316 CHAPTER 5: TENSOR TRANSFORM METHOD
0.8 50
2
8 100
0.6
7
0.4 1 4 150
6
5 3
0.2 9 200
10
250
0
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 1 11 3 5 5 8 4 10 3 13 cpu time/rect=1.86 min
TABLE 5.4
Integer data of 10 rectangles
k x0k yk0 ∆x0k ∆yk0 Rk
1 25 84 22 40 1
2 68 151 116 65 11
3 132 28 112 117 3
4 198 101 10 1 5
5 16 72 72 32 5
6 27 53 20 87 8
7 122 95 34 86 4
8 154 105 15 114 10
9 99 45 79 25 3
10 35 10 106 54 13
k = 1 : 10. These coordinates of all rectangles and their intensities are given
in Table 5.4.
Below is the beginning of the script (image reconstionA3A4.m), where the
random rectangles are generated and saved as data data allrect in integer
format [x,y,dx,dy,d intensity].
% --------------------------------------------------------------
% call: image_reconstructionA3A4m.m
% Modified General code (N is prime)
% The rectangles are assumed on the grid NxN.
% One set of projections is used to scan all rectangles.
% The inverse 2-D tensor transform is used
% Artyom and Meruzhan Grigoryan, June 30 / July 12, 2011
Image Processing 317
TABLE 5.5
Data of 10 rectangles
k xk yk ∆xk ∆yk Rk
1 0.0973 0.3268 0.0856 0.1556 1
2 0.2646 0.5875 0.4514 0.2529 11
3 0.5136 0.1089 0.4358 0.4553 3
4 0.7704 0.3930 0.0389 0.0039 5
5 0.0623 0.2802 0.2802 0.1245 5
6 0.1051 0.2062 0.0778 0.3385 8
7 0.4747 0.3696 0.1323 0.3346 4
8 0.5992 0.4086 0.0584 0.4436 10
9 0.3852 0.1751 0.3074 0.0973 3
10 0.1362 0.0389 0.4125 0.2101 13
Case (A4): For generators (1, s), (N − 1)/2 < s < N, the (1, s − N )-
projections are considered. Therefore, the A-rays are described by equations
n t 1+s−No
l(t) = l1,s−N (t) = x − (N − s)y = + ,
N 2N
where t = (N − 1) : −1 : (s − N )(N − 1). The set of G-rays are defined from
the A-rays by the shift t0 = (1 + N − s)/2 − 1. The equations for the G-rays
are described as
n t 1 + so
l(t) = ˜
˜ l1,s (t) = l1,s (t − t0 ) = x − (N − s)y = −1+ . (5.30)
N N
Case (A3): Generators are (1, s), when 0 < s ≤ N/2. The equations for
A-and G-rays are:
n t 1 + so
l(t) = l1,s (t)= x − sy = −s− ,
n N 2N
o (5.31)
˜ t 1
l(t) = ˜
l1,s (t)= x − sy = −s+ ,
N N
where t = 0 : (s + 1)(N − 1).
Case (A4): Generators are (1, s), when (N − 1)/2 < s < N. The A-rays
and G-rays are described by equations
n t N + s − 1o
l(t) = l1,s−N (t)= x − (N − s)y = − + ,
n N o2N
˜ t s (5.32)
l(t) = ˜
l1,s (t)= x − (N − s)y = − + ,
N N
t= 0 : (1 + N − s)(N − 1).
When (p, s) = (0, 1) and (1, 0), the G-rays are defined as
n t 1 o
l(t) = lp,s (t) = px − sy = + −s , t = 0 : (N − 1).
N 2N
b0 = w(0),
b1 = w(1) − b0 ,
b2 = w(2) − (b1 + b0 ),
b3 = w(3) − (b2 + b1 + b0 ),
(5.34)
... ... ... ... ... ...
bs−1 = w(s − 1) − (bs−2 + bs−3 + ... + b1 + b0 ),
bt = w(t) − (bt−1 + bt−2 + ... + bt−s+2 + bt−s+1)),
t = s, s + 1, . . . , (1 + s)(N − 1).
bM = w(M ),
bM +1 = w(M + 1) − bM ,
bM +2 = w(M + 2) − (bM +1 + bM ),
bM +3 = w(M + 3) − (bM +2 + bM +1 + bM ),
... ... ... ... ... ... ... ... (5.37)
bM +s̄−1 = w(M + s̄ − 1) − (bM +s̄−2 + bM +s̄−3 + ... + bM +1 + bM ),
bt = w(t) − (bt−1 + bt−2 + ... + bt−s̄+2 + bt−s̄+1) ),
t = M + s̄, M + s̄ + 1, . . . , (N − 1).
10
w1,0(t) 0.035 v1,0(t) 0.035 f1,0,t
8 0.03 0.03
0.025 0.025
6
0.02 0.02
4 0.015 0.015
0.01 0.01
2
0.005 0.005
0 0 0
0 100 200 0 100 200 0 100 200
FIGURE 5.38
Line-integrals, sums, and the splitting-signal for the horizontal projection.
sums v(t) = v1,0 (t) are the same, and equal the line-integrals, up to the
constant 257, i.e., v(t) = w(t)/257. Figure 5.39 shows the data for the (1, 2)-
and (1, 254)-projections. For the (1, 2)-projection, the line-sums v(t) = v1,2 (t),
where t = 0 : 768, are calculated from the line-integrals w(t) = w1,2(t) by
√
v(t) = bt /(257 5/2), t = 0 : 768,
b0 = w(0), bt = w(t) − bt−1 , t = 1 : 768.
10 0.01
w1,2(t) v1,2(t) 2 f1,2,t
8 0.008
1.8
6 0.006
1.6
4 0.004
2 0.002 1.4
0 0 1.2
0 200 400 600 0 200 400 600 0 100 200
−5
x 10
8 4 0.022
w1,254(t) v1,254(t) f1,254,t
0.02
6 3
0.018
4 2 0.016
0.014
2 1
0.012
0 0 0.01
256 −256 −768 256 −256 −768 0 100 200
FIGURE 5.39
Line-integral, sums, and splitting-signal for the (1, 2)- and (1, 254)-projections.
as shown
f0,1,0 f0,1,1 . . . f0,1,N−1
f0,1,2
f1,0,0 f1,0,1 . . . f1,0,N−1
f1,0,2
f1,1,0 f1,1,1 . . . f1,1,N−1
f1,1,2 .
f1,2,0 f1,2,1 . . . f1,2,N−1
f1,2,2
... ... ...
... ...
f1,N−1,0 f1,N−1,1 f1,N−1,2 . . .f1,N−1,N−1
For the image f(x, y) shown in Figure 5.37, the 2-D DTT with 258
splitting-signals on its rows is shown in the form of the gray-scale image in
Figure 5.40 in part a. The graph describing the energies of all splitting-signals
4
x 10
2
E1,0
1.95
50
1.9 E1,1
100 1.85
1.8
E0,1
150
1.75 E1,130
200 1.7
1.65
250
1.6
50 100 150 200 250 0 50 100 150 200 250
(a) (b)
FIGURE 5.40
(a) Two-dimensional 258 × 257-point DTT of the image (in scaled format),
and (b) the graph of the energy of splitting-signals.
which are equal to 19718, 19060, 17235, and 17544, for the (1, 0), (1, 1), (0, 1),
and (1, 130)-projections, respectively.
The reconstructed discrete image fn,m is obtained by the inverse tensor
transformation, which is calculated by (5.2). The calculation of the inverse
2-D DTT by this formula is used in the script (example7x7 inverseDTT.m) in
the considered 7 × 7 example. The following script (inverse 2DDTT.m) can be
used for computing the inverse N × N -point 2-D DTT in the general case,
when N is prime.
% --------------------------------------------------
% Call: inverse_2DDTT.m
% Jps={(1,s);s=0:N-1},{(0,1)}
% A.M. Grigoryan and Nan Du, 10/27/2009
324 CHAPTER 5: TENSOR TRANSFORM METHOD
% --------------------------------------------------
function image_fromTT=inverse_2DDTT(DTT_ofimage,N)
% The inverse formula of the tensor transform:
image_fromTT=zeros(N,N);
N1=N-1;
for n1=0:N1
n=n1+1;
for m1=0:N1
m=m1+1;
image_fromTT(n,m)=DTT_ofimage(1,n);
col=m1-n1;
for p=2:N+1
col=col+n1;
if col>=N
col=col-N;
end
image_fromTT(n,m)=image_fromTT(n,m)+...
DTT_ofimage(p,col+1);
end
end
end
% Remove the redundancy of the tensor transform
image_power=sum(DTT_ofimage(1,:));
image_fromTT=(image_fromTT-image_power)/N;
% --------------------------------------------------
5.7 MATLAB
R
-based code (N prime)
In this section, we give the script image reconstructionA3A4m.m of the main
program for image reconstruction. The beginning of this program is given in
§5.4, and below is the remaining part of this program.
% -----------------------------------------------------
% call: image_reconstructionA3A4m.m
....
% =====================================================
% START THE IMAGE RECONSTRUCTION
% 1. The set J of all (N+1) generators (p,s):
for p=0:N-1
Jps(p+1,:)=[p,1];
end
Jps(p+2,:)=[1,0];
Nps=N+1;
% Reconstruction of all rectangles
% 1. Composition of the tensor from the integrals
image_pst=reconstruct_AllrectanglesA34m(data_allrect,N,Jps);
Image Processing 325
% ---------------------------------------------------------------------
% call: reconstruct_AllrectanglesA34m.m
% Processing: one projection for all rectangles.
% Set of generators: Jps={{(p,1);p=0:N-1},(1,0)}
% Each (p,s)-projection is processing and the 2-D tensor
% is composed in row # (p+s)+1 (and 1, when (p,s)=(0,1))
% Artyom and Meruzhan Grigoryan, June 30 / July 12, 2011
% ---------------------------------------------------------------------
function image_pst=reconstruct_AllrectanglesA34m(data_allrect,N,Jps)
%I 1. Determine the data of rectangles
many_rectangles=size(data_allrect,1);
d_xin1=1/N; % the length of 1 cell (IE)
d_yin1=d_xin1; % the high of the cell (IE)
% 2. The set of values of np=p,N-p in Jps
Nps=N+1; N_half=Nps/2-1;
np_formatrixT=zeros(1,Nps);
np_formatrixT(1:N_half+1)=0:N_half; % case 1
tnp=N-N_half-1:-1:1;
np_formatrixT(N_half+2:N)=tnp; % case 2
np_formatrixT(Nps)=0; % case 3
%II Process each (p,s)-projection
image_pst=zeros(Nps,N); % matrix for the 2-D DTT
number_ofallintegrals=0;
for kps=1:Nps
p=Jps(kps,1); s=Jps(kps,2);
if (s==0) % & (p==1) % for (1,0)
nrow=1; % the row in 2-D DTT
else nrow=p+2; % for (p,1), p=0:(N-1)
end
np=np_formatrixT(kps);
if np==0 % cases (p,s)=(1,0) and (0,1)
delta_r=d_xin1; % 1/N;
326 CHAPTER 5: TENSOR TRANSFORM METHOD
else
delta_r=sqrt(1+np^2)/d/N;
end
% delta_r = length of the path of the ray in IE
for k=1:many_rectangles
% 1. Read the rectangle data
data_1rect=data_allrect(k,:);
n0=data_1rect(1); m0=data_1rect(2);
dx=data_1rect(3); dy=data_1rect(4); k_in=data_1rect(5);
% The coordinates of the k-th rectangle:
x0=n0; y0=m0; x1=(n0+dx); y1=(m0+dy);
p_rect=[x0 y0; x1 y1];
% 2. Calculation of the (p,s)-projection, w(t):
[W,number_ofw]=projection_inrectangle2N(p,s,N,p_rect,N_half);
number_ofallintegrals=number_ofallintegrals+number_ofw;
W=W/N; % to go back to the grid [0,1]x[0,1]
W=W*k_in; % consider the rectangle intensity
% 3. Translate geometry: G-rays into A-rays
if np==0 % cases (p,s)=(1,0) and (0,1)
B=W;
else
B=solution_of_linearsystemA(np-1,W);
end
% 4. Composition of the N-dim. vector a(n) from B(t)
A=Avector_composition(N,B);
% 5. Normalization by the path
A=A/delta_r;
% 6. Correction in case 2: reordering of data in A(n)
A1=A;
if (s==1) && (p>N_half)
A1=vectorA_indexcorection(p-N,N,A);
end
% 7. Matrix composition for the Nx(N+1)-point DTT
for i1=1:N
image_pst(nrow,i1)=image_pst(nrow,i1)+A1(i1);
end
clear W B A A1;
end
end
fprintf(’\n # of all integrals w(t) is %g \n’,number_ofallintegrals);
% ---------------------------------------------------------------------
TABLE 5.7
Time for the Ci-based program (the 1st version)
N ×N projection data processing & reconstruction
37 × 37 00 : 00 : 00.03
67 × 67 00 : 00 : 00.08
101 × 101 00 : 00 : 00.27
127 × 127 00 : 00 : 00.50
257 × 257 00 : 00 : 04.21
401 × 401 00 : 00 : 16.67
509 × 509 00 : 00 : xx.xx
521 × 521 00 : 00 : 37.24
797 × 797 00 : 02 : 15.82
1031 × 1031 00 : 04 : 55.69
1777 × 1777 00 : 25 : 29.33
2053 × 2053 00 : 39 : 40.44
Problems
Problem 5.1 Consider case A for all generators (1, s), s = 0 : (N − 1),
when all G-rays are described by equation (5.29). Consider also that the
(1, s)-projections are not substituted by (1, s − N )-projections, when s >
(N − 1)/2. Write the code for image reconstruction using these rays. Dis-
cuss how fast or slow your program is, when compared with the program
image reconstructionA3A4m.m. For that, you may consider images on the square
[0, 1] × [0, 1], which are composed of random rectangles, each with constant
intensity, and the Cartesian lattices N × N, for different prime N.
Problem 5.2 Suppose that you are given an image in the square [0, 1] × [0, 1]
with image elements in the lattice 257 × 257. Generate such an image from
the random rectangles.
A. For the (1, 4)-projection, calculate the line-integrals w(t), sums v(t),
and the tensor splitting-signal {f1,4,t; t = 0 : 256}. Sketch your results.
328 CHAPTER 5: TENSOR TRANSFORM METHOD
B. In most cases, the splitting-signals for the vertical and horizontal pro-
jections have high energy and represent big contributions in the reconstruction
of the image. Discuss the reconstruction without these projections. In other
words, calculate the image which is reconstructed from the (1, s)-projections,
where s = 1 : 256.
Problem 5.3 Suppose that you are given an image in the square [0, 1]×[0, 1],
which is composed of a few rectangles with constant intensity each. Each image
element has the size 1/10 × 1/10. Discuss the reconstruction of the image on
the lattice 10 × 10. Write your code and show results of reconstruction on
examples.
Problem 5.4 The method of G-rays and tensor transform for image recon-
struction, which is described in this chapter, can be applied for any size lattice
N × N, where N > 1 is an integer. Suppose that you are given an image in
the square [0, 1] × [0, 1], which is composed of a few rectangles with constant
intensity each. Each image element has the size 1/N × 1/N. Discuss the re-
construction of the image on the lattice N × N, when N = 100.
Problem 5.5 Suppose that you are given an image in the square [0, 1]×[0, 1].
As an example, generate such an image from the random rectangles on the
Cartesian lattice 128 × 128. Sample this image on the lattice 127 × 127 and
calculate the reconstruction of the image on this lattice. Discuss the result
and calculate the minimum mean-square-root error of reconstruction.
Problem 5.6∗ Our program image reconstructionA3A4m.m works 1.80 minu-
tes (with graphics), when reconstructing the image on the lattice 257 × 257.
The image is composed of ten random rectangles and it is shown in Figure 5.41.
The realization of this program in Ci+ is much faster (by about 10 s). Develop
9
0.8 6 50
5 1
0.6 100
28
10
4
0.4 150
7
3
0.2 200
250
0
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 10 4 15 12 5 11 16 7 9 17 cpu time/rect=1.80 min
the Ci version of this code, or write your own code in Ci+ to reconstruct the
image from its projections.
6
Method of Particles
For the scanning scheme that is used in the tensor and paired methods of
329
330 CHAPTER 6: Method of Particles
image reconstructions, the lengths ∆l(nk , mk ) are equal for all rays of the
projection, i.e.. ∆l(nk , mk ) = ∆l(p, s). Therefore, the above equation can be
written as
K
X
wp,s (t) = ∆l(p, s) fnk ,mk . (6.2)
k=1
Let rp,s (t) be the real value of the f(x, y) image integral along the ray
lp,s (t). We consider the mean square deviation of the sum of real rays from
their discrete representation
X 2
ε= (wp,s (t) − rp,s (t)) , (6.3)
(p,s)∈JN,N
where JN,N is the set of all generators (p, s). By minimizing this error by
derivatives, we consider the system of equations
∂ε X ∂wp,s (t)
= 2 (wp,s (t) − rp,s (t)) = 0, n, m = 0 : (N − 1),
∂fn,m ∂fn,m
(p,s)∈JN,N
or
X ∂wp,s (t) X ∂wp,s (t)
wp,s (t) = rp,s (t) .
∂fn,m ∂fn,m
(p,s)∈JN,N (p,s)∈JN,N
One can notice that for each image element, or square [n, m], the summations
of integrals are accomplished only by the rays lp,s (t) passing through [n, m].
Therefore, we are faced with the concept of the “particle” as the sum of rays
passing through the given image element. It should also be noted that if we
consider equations (6.2) in normalized form,
K
wp,s (t) X
w̃p,s (t) = = fnk ,mk ,
∆l(p, s)
k=1
This means the equations and the concept of the particle, which we want to
introduce, can be described in integer form, such as integer matrices.
Image Processing 331
This concept will be described first for the A-rays. For that, we create a
picture of all rays passing through the center of a given (n0 , m0 )-th square,
where n0 , m0 ∈ {0, 1, ..., (N − 1)}, in the discrete model of the image. First
we consider the example. For the case when N = 8 and (n0 , m0 ) = (3, 3), we
introduce the following table:
1 0 1 1 1 0 1 0
0 1 1 1 1 1 0 1
0 1 1 1 1 1 0 1
1 1 1 12 1 1 1 1
A(3, 3) = A(8; 3, 3) = 0 1 1 1 1 1 0 0 .
(6.4)
0 1 1 1 1 1 0 1
1 0 1 1 1 0 1 0
0 1 1 1 0 1 0 1
We call this table the map of projections for point (3, 3), or the point map of
projections for (3, 3). For (n, m) 6= (3, 3), the coefficient a(n, m) = a(3, 3, n, m)
of this matrix equals 1, if there is an A-ray passing through the points (3, 3)
and (n, m) at the same time. This coefficient equals 0, if there is no such A-ray.
In the center, the coefficient a(3, 3) equals 12, or the number of projections.
There are 12 rays passing through the point (3, 3), which cover 46 points
(n, m) on the Cartesian grid 8 × 8.
The descriptions of all 12 rays passing through the point (3, 3) are given
in Table 6.1. The coordinates of points (n, m), or squares [n, m] that lie on
TABLE 6.1
Coordinates of the projection map for point (3, 3)
(p, s) points [n, m] card g(p, s)
(1, 0) [4, 1] [4, 2] [4, 3] [4, 4] [4, 5] [4, 6] [4, 7] [4, 8] 8 1
(1, 1) [7, 1] [6, 2] [5, 3] [4, 4] [3, 5] [2, 6] [1, 7] 7 1
(1, 2) [8, 2] [6, 3] [4, 4] [2, 5] 4 2
(1, 3) [7, 3] [4, 4] [1, 5] 3 3
(1, 4) [8, 3] [4, 4] 2 4
(1, 5) [7, 5] [4, 4] [1, 3] 3 3
(1, 6) [8, 6] [6, 5] [4, 4] [2, 3] 4 2
(1, 7) [8, 8] [7, 7] [6, 6] [5, 5] [4, 4] [3, 3] [2, 2] [1, 1] 8 1
(0, 1) [1, 4] [2, 4] [3, 4] [4, 4] [5, 4] [6, 4] [7, 4] [8, 4] 8 1
(2, 1) [2, 8] [3, 6] [4, 4] [5, 2] 4 2
(4, 1) [3, 8] [4, 4] 2 4
(6, 1) [3, 2] [4, 4] [5, 6] [6, 8] 4 2
the rays passing through the point (3, 3) are given. On the 3-rd column of the
table, the cardinalities c(p, s), i.e., the numbers of the points (n, m) on the
rays are shown.
To calculate tables A(N ; n0 , m0 ) in the general case of N and (n0 , m0 ), we
can use the commands and scripts of the functions Arays nm.m and Aray throu
gh nm.m, which are given below. The variable Anm stands for the point map of
332 CHAPTER 6: Method of Particles
% from: run_pointmap.m
N=8; n0=4; m0=4;
Anm=Arays_nm(N,m,n);
% ------------------------------------------------------
% call: Arays_nm.m / A.-M. Grigoryan, June 2011
function Anm=Arays_nm(N,m,n)
Anm=zeros(N);
ps=ps_generators(N); L=size(ps,1);
for n_ps=1:L
p=ps(n_ps,1); s=ps(n_ps,2);
A1=Aray_through_nm(p,s,N,m,n);
Anm=Anm+A1;
end
% -----------------------------------------------------
% call: Aray_through_nm.m / A.-M. Grigoryan, June 2011
function [A,t,Ray_squares]=Aray_through_nm(p,s,N,m0,n0)
S=Arays2grid(p,s,N); L=size(S,1);
[t,ny]=find( S(:,:,1)==m0 & S(:,:,2)==n0 );
card_of_IE=max(find(S(t,:,2),N,’first’));
A=zeros(N);
Ray_squares=zeros(card_of_IE,2);
for k=1:card_of_IE
m1=S(t,k,1); n1=S(t,k,2);
A(m1,n1)=1; fprintf(’[%g,%g] ’,m1,n1);
Ray_squares(k,1)=m1; Ray_squares(k,2)=n1;
end
fprintf(’\n’);
% -----------------------------------------------------
of A-rays passing through the points (n0 , m0 ) and (n, m) at the same time.
We call the two-dimensional function ψn0,m0 (n, m) = a(n0 , m0 , n, m), where
n, m = 0 : (N − 1), the field function of this particle.
Example 6.1 In matrix form, the field functions of the A-particles (0, 1) and
(3, 2) are
1 1 1 0 0 1 0 1
6 1 1 1 0 0 1 1
ψ0,1 =
1 1 0 0
and ψ3,2 = 1 1 1 6 .
(6.5)
1 0 1 0 0 1 1 1
Figure 6.1 illustrates two A-particles (0, 1) and (3, 2) and their field
functions. Points (0, 1), (1, 1), (2, 1), and (3, 1) are on the first A-ray of the
0 0
0.25 0.25
1 1
y and m
y and m
0.5 0.5
2 2
0.75 0.75
3 3
1 1
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
0 1 x and n 2 3 0 1 x and n 2 3
FIGURE 6.1
The field functions of the particles (0, 1) and (3, 2).
(0, 1)-projection. Points (0, 1), and (1, 0) are on the first A-ray of the (1, 1)-
projection. Points (2, 3), (1, 2), and (0, 1) are on the first A-ray of the (−1, 1)-
projection (or (3, 1)-projection). Points (0, 0), (0, 1), (0, 2), and (0, 3) are on
A-ray number 0 of the (1, 0)-projection, and (2, 0), (0, 1) are on the second
A-ray of the (1, 2)-projection. The only point on the first A-ray of the (2, 1)-
projection is (0, 1). This single-point ray is shown by the bullet; therefore the
number of rays seen on the figure is 5, but it is actually 6. The description
of the particle (0, 1) with its field function is also given in Table 6.2. The
description of the A-particle (3, 2) with its field function is given in Table 6.3.
A-ray number 8 of the (2, 1)-projection passes through only the point (3, 2) in
the lattice 4 × 4, and this single-point ray is shown by the bullet in the figure.
Figure 6.2 illustrates two A-particles (2, 2) and (2, 1) and their field func-
tions. One can notice six rays for both A-particles, because each of six A-rays
passes through at least two points at the same time.
We can write the field functions of all 16 A-particles on the lattice 4 × 4
in the form of a block-table [ψn,m ]n,m=0:3 , as shown in Table 6.4.
This table, or block-table 4 × 4, with all field functions can be packed into
334 CHAPTER 6: Method of Particles
TABLE 6.2
Description of the A-particle (0, 1)
(p, s) points (n, m) A-ray
(0, 1) (0, 1) , (1, 1) , (2, 1) , (3, 1) #1
(1, 1) (0, 1) , (1, 0) #1
(2, 1) (0, 1) #1
(−1, 1) (2, 3) , (1, 2) , (0, 1) #1
(1, 0) (0, 0) , (0, 1) , (0, 2) , (0, 3) #0
(1, 2) (2, 0) , (0, 1) #2
TABLE 6.3
Description of the A-particle (3, 2)
(p, s) points (n, m) A-ray
(0, 1) (0, 2) , (1, 2) , (2, 2) , (3, 2) #2
(1, 1) (2, 3) , (3, 2) #5
(2, 1) (3, 2) #8
(−1, 1) (3, 2) , (2, 1) , (1, 0) #−1
(1, 0) (3, 0) , (3, 1) , (3, 2) , (3, 3) #3
(1, 2) (3, 2) , (1, 3) #7
0 0
0.25 0.25
1 1
y and m
y and m
0.5 0.5
2 2
0.75 0.75
3 3
1 1
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
0 1 x and n 2 3 0 1 x and n 2 3
FIGURE 6.2
The field functions of the particles (2, 2) and (2, 1).
the following matrix of size 7 × 7, which we call the base matrix of fields of
A-particles:
1 0 0 1 0 0 1
0 1 0 1 1 1 0
0 0 1 1 1 1 0
Ψ= 1 1 1 6 1 1 1. (6.6)
0 1 1 1 1 0 0
0 1 1 1 0 1 0
1 0 0 1 0 0 1
Image Processing 335
TABLE 6.4
Basis of the field
6 1 1 1 1 6 1 1 1 1 6 1 1 1 1 6
1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1
1 0 1 0 1 1 0 1 1 1 1 0 0 1 1 1
1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1
1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1
6 1 1 1 1 6 1 1 1 1 6 1 1 1 1 6
1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1
1 0 1 0 1 1 0 1 1 1 1 0 0 1 1 1
1 1 1 0 0 1 1 1 1 0 1 1 0 1 0 1
1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1
6 1 1 1 1 6 1 1 1 1 6 1 1 1 1 6
1 1 0 0 1 1 1 0 1 1 1 1 0 1 1 1
1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1
1 1 1 0 0 1 1 1 1 0 1 1 0 1 0 1
1 1 1 0 1 1 1 1 0 1 1 1 0 0 1 1
6 1 1 1 1 6 1 1 1 1 6 1 1 1 1 6
for any A-particle (n, m). The base field matrix is symmetric, i.e., Ψ(i, j) =
Ψ(j, i), for i, j = 0 : 6.
We here state that for other values of N = 2r , r > 2, the similar base
matrix of fields of A-particles can also be defined. As an example, we consider
the N = 8 case, and two A-particles (3, 3) and (5, 4), whose field functions
are illustrated in Figure 6.3. There are twelve A-rays passing through the A-
y and m
3 3
0.5 0.5
4 4
0.625 0.625
5 5
0.75 0.75
6 6
0.875 0.875
7 7
1 1
0 0 0.12 1 0.25 2 0.37 3 0.5 4 0.62 5 0.75 6 0.87 7 1 0 0 0.12 1 0.25 2 0.37 3 0.5 4 0.62 5 0.75 6 0.87 7 1
x and n x and n
FIGURE 6.3
The field functions of the particles (3, 3) and (5, 4).
particle (3, 3) in this example. The base matrix of fields of all 64 A-particles
336 CHAPTER 6: Method of Particles
Figure 6.4 illustrates the base matrix of fields of A-particles for the N = 4
and 8 cases in parts a and b, respectively. These matrices are shown in the
1 1
0.5 0.5
0 0
−0.5 −0.5
−1 −1
−1 −0.5 0 0.5 1 −1 −0.5 0 0.5 1
(a) N=4 (b) N=8
FIGURE 6.4
Base matrices of A-particles for (a) N = 4 and for (b) N = 8.
square [−1, 1] × [−1, 1] with the lattice (2N − 1) × (2N − 1). All A-rays passing
through the center (0, 0) of the base matrices are shown as well. Six A-rays
pass through the original in the N = 4 case, and twelve when N = 8. If the
A-ray passes through the centers of other squares [n, m], then the coefficients
Ψ(n, m) = 1.
X N−1
N−1 X
0
fp,s,t = fn,m χ0p,s,t (n, m), 0
(p, s, t) ∈ JN,N .
m=0 n=0
338 CHAPTER 6: Method of Particles
X N−1
N−1 X
0
fv,w = fn,m χ0v,w (n, m), v, w = 0 : (N − 1).
m=0 n=0
X N−1
N−1 X
a(i, j) = fn,m ψn,m (i, j), i, j = 0 : (N − 1). (6.11)
m=0 n=0
X N−1
N−1 X
a(i, j) = fn,m Ψ(N − 1 − n + i, N − 1 − m + j). (6.12)
m=0 n=0
We should notice that the obtained new basis of field functions ψn,m is not
orthogonal. That may be considered as the disadvantage of this basis. On the
contrary, the paired transform is orthogonal, because of the complex way of
combining parallel rays in each projection. This transform was originated from
the tensor transform being non-orthogonal. However, in the paired transform
the orthogonality was achieved by assigning the plus and minus signs to diffe-
rent parts of rays for each projection. In other words, each particle (p, s, t) in
the 3-D space was considered with its co-particle (p, s, t + N/2), and this pair
0
of particles was described by the function fp,s,t = (fp,s,t −fp,s,t+N/2 ), and as a
result, the principle of energy conservation was preserved. The same method
may be considered for the basis field functions, to define the corresponding
bi-orthogonal basis. For that, we first describe the N = 4 case.
All matrices of the field functions can be presented in the form of 1-D
vectors, and then written into the matrix 16 × 16. To accomplish these calcu-
lations, we can run the code as R=A rays2R(4), with the following script of the
function.
function R=A_rays2R(N)
NN=N*N; R=zeros(NN); k=1;
for n=1:N
Image Processing 339
for m=1:N
Anm=Arays_nm(N,m,n);
y=reshape(Anm,1,NN); R(k,:)=y; k=k+1;
end
end
This matrix is symmetric, R = R0 , and its inverse matrix exists, although the
determinant is the large number, det(R) = 4939060313245. To calculate the
inverse matrix R−1 and its 16 basis functions, we can use the code with script
show matrixIR.m, which is given below.
% call: show_matrixIR.m
N=4;
R=A_rays2R(N);
fprintf(’%16.0f \n’,det(R));
% inverse matrix 16x16
Ri=inv(R);
% represent this matrix as the block-matrix 4x4
NN=N*N;
iR=zeros(N,N,NN);
for k=1:NN
y=reshape(Ri(:,k),N,N); iR(:,:,k)=y;
end
% the 1st basis functions of transforms R and Ri
k=1;
field_function=reshape(R(:,k),N,N); % at (0,0)
cof_function=iR(:,:,k)
y=field_function.*cof_function
340 CHAPTER 6: Method of Particles
sum(sum(y))
% ========= calculated data ========================
% det(R)) = 4939060313245
% field_function
6 1 1 1
1 1 0 0
1 0 1 0
1 0 0 1
% cof_function
0.2001 -0.0262 -0.0210 -0.0209
-0.0262 -0.0120 0.0193 0.0110
-0.0210 0.0193 -0.0259 0.0086
-0.0209 0.0110 0.0086 -0.0266
% y
1.2007 -0.0262 -0.0210 -0.0209
-0.0262 -0.0120 0 0
-0.0210 0 -0.0259 0
-0.0209 0 0 -0.0266
% sum(sum(y))=1
% ==================================================
The following three matrices are printed when running this code:
6 1 1 1 0.2001−0.0262−0.0210−0.0209
1 1 0 0 −0.0262−0.0120 0.0193 0.0110
ψ0,0 = 1 0 1 0 , φ0,0 = −0.0210 0.0193−0.0259 0.0086 ,
and
1.2007−0.0262−0.0210−0.0209
−0.0262−0.0120 0 0
ψ0,0 .× φ0,0 =
−0.0210
.
0 −0.0259 0
−0.0209 0 0 −0.0266
The first matrix describes the field function of the A-particle (0, 0); the second
matrix is the first basis function of the inverse transform R−1 . This function is
shown in matrix form. One can notice that in this matrix the maximum value
has the coefficient at the same point (0, 0). This matrix probably describes a
particle (0, 0) in another field. The third matrix is the point-wise multiplication
of these two functions. The sum of all coefficients of the last matrix equals 1.
The similar properties are valid for all other particles (n, m).
For instance, by using the same code for k = 11, we obtain the following
matrices for the A-particle (2, 2) :
1 0 1 1 −0.0259 0.0217−0.0186−0.0130
0 1 1 1
, φ2,2 = 0.0217−0.0142−0.0148−0.0144 ,
ψ2,2 = 1 1 6 1 −0.0186−0.0148 0.2014−0.0173
1 1 1 1 −0.0130−0.0144−0.0173−0.0120
Image Processing 341
−0.0259 0 −0.0186−0.0130
0−0.0142−0.0148−0.0144
ψ2,2 .× φ2,2 −0.0186−0.0148 1.2084−0.0173 ,
=
−0.0130−0.0144−0.0173−0.0120
and
3 X
X 3
ψ2,2 (n, m)φ2,2(n, m) = 1.
n=0 m=0
1 0 1 0 1 0 6 0
Here, the second matrix shows the way we number A-rays passing through
the point (0, 1). It is clock-wise numbering, starting from the horizontal (0, 1)-
projection and considering the last projection to be the (−1, 1)-projection,
which is the (3, 1)-projection. The (2, 1)-projection is the single-point (0, 1)
and has number 4, but is not shown. We denote the linear sums along these
rays by v1 , v2 , ..., v6. Therefore, the sums of all six projections can be written
as
v1 v2 v3 0
X 6
vk v5 v5 v5
Y = .
k=1
v1 v6 0 0
v1 0 v6 0
This matrix can be written column-wise into the raw-vector
6
!
X
Y →y= v1 , vk , v1 , v1 , v2 , v5 , v6 , 0, v3, v5 , 0, v6 , 0, v5, 0, 0 ,
k=1
and then the matrix equation y0 = Rx0 can be solved with respect to the
original image-vector x0 = (x0,0 , x1,0, x2,0 , x3,0, x1,0, ..., x3,2, x3,3)0 .
It is expected, that by using this direct method, the reconstructed image
will be smooth. To analyze this reconstruction, we first write the pro-
gram to accomplish the reconstruction by the given equations. Below is
342 CHAPTER 6: Method of Particles
the script projection4.m of this program. Here, V stands for the vector
V = (v1 , v2 , ..., v6).
% -------------------------------------------------
% call: projection4.m
function X=projection4(V)
if (length(V)~=6) return; end
y=zeros(1,16);
y(1)=V(1); y(3)=V(1); y(4)=V(1); y(2)=sum(V);
y(5)=V(2); y(6)=V(5); y(10)=V(5); y(14)=V(5);
y(7)=V(6); y(12)=V(6); y(9)=V(3);
R=A_rays2R(4); x=inv(R)*y’; X=reshape(x’,4,4);
% -------------------------------------------------
0 0 0 0
We now consider the modified projection data
1 1 1 0
6.2 1 1 1
Y = 1 1.2 0 0 .
1 0 1.2 0
Here we changed the (−1, 1)-projection along the ray passing through the
squares [0, 1], [1, 2], and [2, 3]. For this case, the vector V = (1, 1, 1, 1, 1, 1.2)
and, therefore, the vector y equals (1, 6.2, 1, 1, 1, 1, 1.2, 0, 1, 1, 0, 1.2, 0, 1, 0, 0).
The commands V1=[1 1 1 1 1 1.2]; X1=projection4(V1) result in the follo-
wing image:
0.0003 −0.0064 −0.0117 0.0047
1.0317 −0.0021 −0.0070 −0.0117
X1 = −0.0021 0.0330 −0.0021 −0.0064
The particle (0, 1) is not reconstructed exactly, as are not the remaining parti-
cles on the lattice, although they have small values (and can be thresholded).
Image Processing 343
The square error of this change equals 0.044. To obtain the full picture of
image reconstruction, it is necessary to analyze other particles as well, and we
will leave details of such analysis to the reader.
In general, the small squares, or image elements, contribute to the line-
integrals of projections with different weights, which are defined by different
characteristics, such as the lengths of intersections of squares with rays. There-
fore we define the concept of a particle with the geometrical field function,
which generalizes the concept of the A-particle.
on the lattice 8 × 8:
l1,1 (0)
(0, 0)
l (1)
(1, 0) (0, 1)
1,1
l1,1 (2)
(2, 0) (1, 1) (0, 2)
l1,1 (3)
(3, 0) (2, 1) (1, 2) (0, 3)
l1,1 (4)
(4, 0) (3, 1) (2, 2) (1, 3) (0, 4)
l (5)
(5, 0) (4, 1) (3, 2) (2, 3) (1, 4) (0, 5)
1,1
l1,1 (6)
(6, 0) (5, 1) (4, 2) (3, 3) (2, 4) (1, 5) (0, 6)
l1,1 (7) → (7, 0) (6, 1) (5, 2) (4, 3) (3, 4) (2, 5) (1, 6) (0, 7)
l1,1 (8)
(7, 1) (6, 2) (5, 3) (4, 4) (3, 5) (2, 6) (1, 7)
l1,1 (9)
(7, 2) (6, 3) (5, 4) (4, 5) (3, 6) (2, 7)
l1,1 (10)
(7, 3) (6, 4) (5, 5) (4, 6) (3, 7)
l1,1 (11)
(7, 4) (6, 5) (5, 6) (4, 7)
l (12)
(7, 5) (6, 6) (5, 7)
1,1
l (13)
(7, 6) (6, 7)
1,1
l1,1 (14) (7, 7)
l1,1 (t) = {(n0 , m0 ), (n0 − 1, m0 + 1), ..., (n, m), ..., (m0 − 1, n0 + 1), (m0 , n0 )}
ta(1, 2; 3, 3) = 3 + 2(3) = 9, and the point (4, 3) lies on the A-ray l1,2 (10), be-
cause ta(1, 2; 4, 3) = 4 + 2(3) = 10. Figure 6.5 shows the G-rays with numbers
9 and 10, as well as the filled (3, 3)-th square. These two rays are determined
0
l(9)
0.25
l(10)
1 1 2
0.25
2 1 2 1
0.375
3 1 2 1
y and m
0.5
4 1 2 1
0.625
5 1
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 6.5
G-rays passing through the (3, 3)-th square in the (1, 2)-projection (case A).
by the squares with the following numbers (written from left to right):
l1,2 (9) ={[0, 4], [1, 4], [2, 3], [3, 3], [4, 2], [5, 2], [6, 1], [7, 1]},
l1,2 (10)={[0, 5], [1, 4], [2, 4], [3, 3], [4, 3], [5, 2], [6, 2], [7, 1]}.
Here, and later on, we use the square brackets in equations to distinguish the
difference between the numbering of points and squares; the (n, m)-th square
is denoted by [n, m]. We can write these two ray-sets as
These rays pass together through the squares [1, 4], [3, 3], [5, 2], and [7, 1]. In
other words, these four squares are intersected twice by these G-rays. The
remaining squares from these ray-sets are intersected only once, as shown in
the figure. These coefficients of the intersections c(n, m) can be calculated by
considering only the squares of rays l1,2 (9) and l1,2 (10). Here 2 stands for s,
and 9 is the number of the first G-rays passing through the square [3, 3].
In general, the G-ray l1,2 (t) can be defined by the following set of squares:
We consider the (p, s) = (1, 3) case. The set of A-rays of the (1, 3)-
projection contains 29 rays. We consider only the following three A-rays and
their representations by points (n, m) on the lattice:
l1,3 (12) (6, 2) (3, 3) (0, 4)
l1,3 (13) → (7, 2) (4, 3) (1, 4)
l1,3 (14) (5, 3) (2, 4)
The A-ray passing through the point (n, m) has the number which is calculated
by ta(1, 3; n, m) = n + 3m, n, m = 0 : 7. To verify this formula, we consider
the points (3, 3) and (7, 2). The first point is on the A-ray l1,3 (t) with number
0.25
1 1 l(12)
0.25
l(13)
l(14)
2 1 2 3 2
0.375
3 1 2 3 2 1
y and m
0.5
4 3 2 1
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 6.6
G-rays passing through the square [3, 3] in the (1, 3)-projection (case A).
ta(1, 3; 3, 3) = 3 + 3(3) = 12. This is the number of the first G-ray passing
through the (3, 3)-th square. Figure 6.6 shows the G-rays with numbers 12, 13,
and 14, which pass through the (3, 3)-th square. The point (7, 2) is on the A-
ray l1,3 (13), and ta(1, 3; 7, 2) = 7 + 3(2) = 13. This is the number of the first
Image Processing 347
G-ray passing through the (7, 2)-th square. This square is also on the G-ray
l1,3 (14). We now consider the square-representation of these three G-rays,
l1,3 (12)= {[0, 4], [1, 3], [2, 3], [3, 3], [4, 2], [5, 2], [6, 2], [7, 1]}
l1,3 (13)= {[0, 4], [1, 4], [2, 3], [3, 3], [4, 3], [5, 2], [6, 2], [7, 2]}
l1,3 (14)= {[0, 4], [1, 4], [2, 4], [3, 3], [4, 3], [5, 3], [6, 2], [7, 2]}
These three rays together pass through the squares [0, 4], [3, 3], and [6, 2].
Other squares are intersected once or twice by the G-rays, as shown in the
figure. These coefficients of the intersections c(n, m) can be calculated by
when considering only the three rays l1,3 (12), l1,3 (13), and l1,3 (14). Here, 3
stands for s, and 12 is the number of the first G-rays passing through the
square [3, 3]. The square-set representation of all G-rays of this projection is
described by
We consider the next (p, s)-projection, when (p, s) = (1, 4). G-rays of this
projection can be described by the square-set similar to the cases (p, s) = (1, 2)
and (1, 3). The unique A-ray l1,4 (t) of this projection, which intersects the
point (n, m) on the lattice, has the number t = n + 4m. Let us consider as an
example, the point (3, 3), which is on the A-ray with number 15. This A-ray
passes through the point (7, 2) on the lattice. Figure 6.7 shows four G-rays,
starting with the ray l1,4 (15), which is the first ray passing through this point.
It is not difficult to see from this figure that these rays can be described
by the following squares:
l1,4 (15)={[0, 3], [1, 3], [2, 3], [3, 3], [4, 2], [5, 2], [6, 2], [7, 2]}
l1,4 (16)={[0, 4], [1, 3], [2, 3], [3, 3], [4, 3], [5, 2], [6, 2], [7, 2]}
l1,4 (17)={[0, 4], [1, 2], [2, 3], [3, 3], [4, 3], [5, 3], [6, 2], [7, 2]}
l1,4 (18)={[0, 4], [1, 2], [2, 4], [3, 3], [4, 3], [5, 3], [6, 3], [7, 2]}.
and, in general,
These four rays together pass through the squares [3, 3] and [7, 2]. Other
348 CHAPTER 6: Method of Particles
0.25
0.25 l(15)
2 1 2 3 4 l(17)
0.375
3 1 2 3 4 3 2 1
y and m
0.5
4 3 2 1
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 6.7
G-rays passing through the square [3, 3] in (1, 4)-projection (case A).
squares are intersected once, twice, or three times by the G-rays, as shown in
the figure. The coefficients of the intersections c(n, m) for other squares can
be calculated by
when considering only these four rays. Here, 4 stands for s, and 15 is the
number of the first G-rays passing through the square [3, 3].
Thus, for the G-rays of the (1, s)-projection, when 1 ≤ s ≤ 4, the following
holds:
l1,s (t) = {[n, m]; n + sm ∈ {t − s − 1, ..., t − 1, t}}, t = 0 : 7(1 + s),
(6.14)
c(n, m) = s − |(n − 3) + s(m − 3)|, n, m = 0 : 7,
0.25
0.25
2 3 2 1
0.375
3 1 2 3 2 1
y and m
0.5
4 1 2 3 2
l(−4)
0.625 l(−5)
l(−6)
5 1
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 6.8
G-rays passing through the square [3, 3] for the (1, −3)-projection (case A).
For positive numbering, when t → t̄ = t+21, we can use the following equation
for these rays:
These three rays together pass through the squares [0, 2], [3, 3], and [6, 4].
Other squares are intersected once or twice by these G-rays, as shown in the
figure. The coefficients of the intersections c(n, m) for other squares can be
calculated by
c(n, m) = 3 − |(n + 3(7 − m) − 15| = 3 − |(n − 3) + 3(7 − (m − 3)) − 21|,
when considering only these three rays. Here 3 stands for −s, and 15 is the
number of the first G-rays passing through the square [3, 3].
We consider the next projection, the (1, −2)-projection, when (p, s) =
(1, 6). Two G-rays of this projection, which pass through the square [3, 3], are
shown in Figure 6.9. These rays have numbers −2 and −3, respectively, or 12
0.25
1 1
0.25
2 1 2 1
0.375
3 1 2 1
y and m
0.5
4 1 2 1
0.625
5 1 2 l(−2)=l(12)
0.75 l(−3)=l(11)
6
0.875
1
0 1 2 3 4 5 6 7
FIGURE 6.9
G-rays pass the square [3, 3] in the (1, −2)-projection (case A).
and 11, when numbering after the transform t → t̄ = t + 14. The number 11
is calculated by 3 + 2(7 − 3), and the 11-th G-ray is considered to be the first
ray intersecting the square [3, 3]. The square set representation of these two
rays is described by
l1,−2 (−2)= {[0, 1], [1, 2], [2, 2], [3, 3], [4, 3], [5, 4], [6, 4], [7, 5]}
l1,−2 (−3)= {[0, 2], [1, 2], [2, 3], [3, 3], [4, 4], [5, 4], [6, 5], [7, 5]}.
We can also write the following:
l1,−2 (−2) ={[n, m]; n + 2(7 − m) ∈ {11, 12}}
l1,−2 (−3) ={[n, m]; n + 2(7 − m) ∈ {10, 11}}.
Image Processing 351
In general, for positive numbering of the rays, we write these two rays as
The rays together pass through the squares [1, 2], [3, 3], [5, 4], and [7, 5]. Other
squares are intersected once by these G-rays, as shown in the figure. The
coefficients of the intersections c(n, m) for other squares can be calculated by
when considering only these two rays. Here, 2 stands for −s, and 11 is the
number of the first G-rays passing through the square [3, 3].
For the (−1, 1)-projection, the G-rays are described by the following
squares:
l(0)
[7, 0]
l(1)
[6, 0] [7, 1]
l(2)
[5, 0] [6, 1] [7, 2]
l(3)
[4, 0] [5, 1] [6, 2] [7, 3]
l(4)
[3, 0] [4, 1] [5, 2] [6, 3] [7, 4]
l(5)
[2, 0] [3, 1] [4, 2] [5, 3] [6, 4] [7, 5]
l(6)
[1, 0] [2, 1] [3, 2] [4, 3] [5, 4] [6, 5] [7, 6]
{l−1,1 (t)} = l(7) → [0, 0] [1, 1] [2, 2] [3, 3] [4, 4] [5, 5] [6, 6] [7, 7]
l(8)
[0, 1] [1, 2] [2, 3] [3, 4] [4, 5] [5, 6] [6, 7]
l(9)
[0, 2] [1, 3] [2, 4] [3, 5] [4, 6] [5, 7]
l(10)
[0, 3] [1, 4] [2, 5] [3, 6] [4, 7]
l(11)
[0, 4] [1, 5] [2, 6] [3, 7]
l(12)
[0, 5] [1, 6] [2, 7]
l(13)
[0, 6] [1, 7]
l(14) [0, 7]
The number of the G-ray passing through the square [n, m] is defined by the
same formula as for the A-ray passing through the point (n, m) on the grid,
ta(7, 1; n, m) = ta(−1, 1; n, m) = (7 − n) + m, n, m = 0 : 7.
For example, the square [3, 3] is in the same direction as the G-ray number
(7 − 3) + 3 = 7. In this diagonal projection, each square is intersected by only
one G-ray.
l(9) l(10)
0 1 1
0.25
1 2
0.25
2 1 1
0.375
3 2
y and m
0.5
4 1 1
0.625
5 2
0.75
6 1 1
0.875
7 2
1
0 1 2 3 4 5 6 7
FIGURE 6.10
G-rays passing through the square [3, 3] in the (2, 1)-projection (case A).
We can also write l2,1 (9) = {[n, m]; 2n + m ∈ {8, 9}}, and in general
The coefficients of the intersections c(n, m) of squares along these two G-rays
with number 8 and 9 can be calculated by
Here 2 stands for p, and 9 is the number of the first G-rays passing through
the square [3, 3].
The above given description of the G-rays corresponds to case A, when
the A-rays are shifted by t → t − 0.5. In our code, for the (p, 1)-th projections,
when p ≤ N/2, we use case B, when the A-rays are shifted by t → t + 0.5.
Therefore, the first ray passing through the (3, 3)-th square has number 8, and
therefore, l2,1 (8) = {[n, m]; 2n + m ∈ {8, 9}}. In general for case B, the G-ray
number t can be described by
For the (4, 1)-projection, the first of four G-rays intersecting the square
[3, 3] has the number 4(3) + 1(3) = 15. In Figure 6.11, these four rays are
Image Processing 353
l(15) l(17)
0 1 3
0.25
1 2 2
0.25
2 3 1
0.375
3 4
y and m
0.5
4 1 3
0.625
5 2 2
0.75
6 3 1
0.875
7 4
1
0 1 2 3 4 5 6 7
FIGURE 6.11
G-rays passing through (3, 3) for the (4, 1)-projection (case A).
l4,1 (15)= {[2, 7], [2, 6], [2, 5], [2, 4], [3, 3], [3, 2], [3, 1], [3, 0]}
or l4,1 (15) = {[n, m]; 4n + m ∈ {12, 13, 14, 15}}. In general, the G-rays are
described similarly,
The coefficients of the intersections c(n, m) of squares along these four G-rays
can be calculated by
Here 4 stands for p, and 15 is the number of the first G-rays passing through
the square [3, 3].
The numbering of the G-rays in the figure corresponds to case A, when A-
rays are shifted by t → t − 3/2. In case B, the shift of A-rays is by t → t + 3/2,
and ray number 15 has number 12, and ray number 17 is 14. Therefore, we
can write that
l(−2) l(−3)
0
0 1 1
0.25
1 2
0.25
2 1 1
0.375
3 2
y and m
0.5
4 1 1
0.625
5 2
0.75
6 1 1
0.875
7 2
1
0 1 2 3 4 5 6 7
FIGURE 6.12
G-rays passing through the square [3, 3] in the (−2, 1)-projection (case A).
through the square is the ray with number −2(3) + 1(3) = −3. The square
representations of this ray and the next ray l(−2) are the following:
l−2,1 (−3)= {[2, 0], [2, 1], [3, 2], [3, 3], [4, 4], [4, 5], [5, 6], [5, 7]}
l−2,1 (−2)= {[1, 0], [2, 1], [2, 2], [3, 3], [3, 4], [4, 5], [4, 6], [5, 7]}.
For positive numbering, when t → t̄ + 14, the rays with numbers −3 and −2
have numbers 11 and 12, respectively, and the above representations can be
Image Processing 355
written as
l1,−2 (t) = l1,−2 (t̄) = {[n, m]; 2(7 − n) + m ∈ {t̄ − 1, t̄}},
where t̄ = 11 and 12. In general, this representation holds for all G-rays of the
(−2, 1)-projection. It is clear, that for the horizontal and vertical projections,
i.e., for the (1, 0)- and (0, 1)-projections, each square [n, m], including [3, 3], is
intersected by only one G-ray.
the same sum of values 2 · 26 = 52. One also can notice that all frame-sets are
the same for two maps of projections C(3, 3) and C(4, 4).
We now extend the map C(3, 3) to the square matrix 9 × 9 with the 4-th
Image Processing 357
frame,
10 2 0 1 4 2 0 1
01 1 1 2 4 1 1 0
31 1 2 3 4 1 1 3
24 4 4 6 6 6 7 6
1 2 5 10 26 10 5 2 1 .
U9,9 (26) = (6.16)
67 6 6 6 4 4 4 2
31 1 4 3 2 1 1 3
01 1 4 2 1 1 1 0
10 2 4 1 0 2 0 1
We call this matrix the UH-square 9 × 9 of the number 26. In our study, we
also use the UH-square 15 × 15 of the number 26, which equals
1 0 0 1 1 0 0 1 1 3 1 1 0 0 1
0 1 0 0 2 0 0 1 2 2 2 0 0 1 0
0 0 1 0 1 1 0 1 3 2 1 0 1 0 0
1 0 0 1 0 2 0 1 4 2 0 1 0 0 1
2 2 1 0 1 1 1 2 4 1 1 0 1 2 2
2 3 3 3 1 1 2 3 4 1 1 3 4 5 5
0 0 1 2 4 4 4 6 6 6 7 6 4 2 1
1 1 1 1 2 5 10 26 10 5 2 1 1 1 1 .
U15,15 (26) = (6.17)
1 2 4 6 7 6 6 6 4 4 4 2 1 0 0
5 5 4 3 1 1 4 3 2 1 1 3 3 3 2
2 2 1 0 1 1 4 2 1 1 1 0 1 2 2
1 0 0 1 0 2 4 1 0 2 0 1 0 0 1
0 0 1 0 1 2 3 1 0 1 1 0 1 0 0
0 1 0 0 2 2 2 1 0 0 2 0 0 1 0
1 0 0 1 1 3 1 1 0 0 1 1 0 0 1
In general, the UH-square of the number M is such a square matrix, that all
frame-sets of this matrix satisfy the following property: the sum of coefficients
on the frame-set equals 2M.
Thus, for the square [3, 3] we constructed the matrix C(3, 3) with coeffi-
cients c(n, m) = c(3, 3, n, m) defining the number of G-rays passing through
the squares [3, 3] and [n, m] at the same time. The coefficient c(3, 3) is consi-
dered to be the center of this matrix. In general, for a given square [n0 , m0 ]),
we can construct a similar matrix with the center in (n0 , m0 ). For instance,
for the square [4, 4], we obtain the following map of projections, or the matrix:
1 0 2 0 1 4 2 0
0 1 1 1 2 4 1 1
3 1 1 2 3 4 1 1
2 4 4 4 6 6 6 7
C(4, 4) =
1 2 5 10 26 10 5 2
(6.18)
6 7 6 6 6 4 4 4
3 1 1 4 3 2 1 1
0 1 1 4 2 1 1 1
358 CHAPTER 6: Method of Particles
with the coefficient c(4, 4, 4, 4) = 26 at the center. The sum of all coefficients
in this matrix equals 207 as for the matrix C(3, 3), and it is a sub-matrix of
the UH-square 15 × 15.
Hereinafter we consider the set of projections which are defined by the tensor
representation of the discrete image. Therefore, G-particles are referred to as
the tensor G-particles. For the same reason, the A-particles defined earlier are
referred to as the tensor A-particles.
Example 6.3 In the N = 4 case, the field functions of the G-particles (1, 1)
and (2, 1) are
3 2 1 0 2 1 0 1
2 8 2 1 3 2 1 0
φ1,1 =
1
and φ2,1 = . (6.19)
2 3 2 2 8 2 1
0 1 2 1 1 2 3 2
Figure 6.13 illustrates two G-particles (1, 1) and (2, 1) and their field func-
tions. The number of G-rays passing through each G-particle equals 8. One
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 0.5 1 0 0.5 1
can notice that the picture of the intersection of G-rays with each square [n, m]
is the same. It is the geometric representation, or symbol, of the G-particle. To
have such a “uniform” set of rays, we add a few rays for each (p, s)-projection,
when (p, s) 6= (0, 1), (1, 0), (1, 1) and (−1, 1).
Image Processing 359
TABLE 6.6
Field functions of G-particles
8 2 1 1 2 8 2 1 1 2 8 2 1 1 2 8
2 3 2 1 1 2 3 2 0 1 2 3 0 0 1 2
1 2 1 1 0 1 2 1 1 0 1 2 0 1 0 1
1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1
2 1 0 0 3 2 1 0 2 3 2 1 1 2 3 2
8 2 1 1 2 8 2 1 1 2 8 2 1 1 2 8
2 3 3 1 1 2 3 2 0 1 2 3 0 0 1 2
1 2 1 1 0 1 2 1 1 1 1 2 0 1 0 1
1 0 1 0 2 1 0 1 1 2 1 0 1 1 2 1
2 1 0 0 3 2 1 0 2 3 2 1 1 2 3 2
8 2 1 1 2 8 2 1 1 2 8 2 1 1 2 8
2 3 2 1 1 2 3 2 0 1 2 3 0 0 1 2
1 0 0 1 1 1 0 0 1 1 1 0 1 1 1 1
1 0 1 0 2 1 0 1 1 2 1 0 1 1 2 1
2 1 0 0 3 2 1 0 2 3 2 1 1 2 3 2
8 2 1 1 2 8 2 1 1 2 8 2 1 1 2 8
for any A-particle (n, m). The base matrix is symmetric, i.e. Ψ(i, j) = Ψ(j, i),
for i, j = 0 : 6. One can notice that the base matrix is the UH-square 7 × 7 of
number 8.
All 16 field functions of G-particles can be represented in the form of 1-D
vectors of length 16 each, and then written into the matrix 16 × 16. The result
360 CHAPTER 6: Method of Particles
This matrix is symmetric, R = R0 , its inverse matrix exists, and the de-
terminant is det(R) = 17023383606024.
where n, m ∈ {0, 1, ..., N −1}. The size of the base matrix is (2N −1)×(2N −1)
and the matrix is symmetric. The base field function for the N = 8 case is
given in (6.17), which is the UH-square 15 × 15 of number 26. This number,
as the central coefficient of the base field function, can be calculated by
3
Ψ(N − 1, N − 1) = 2 + N 2 , N = 4, 8, 16, 32, ... .
8
6.2.5.1 Codes for particles
We present a few codes that were used to calculate all matrices that were
described above for the N = 4 and 8 examples. First, we consider the script
UH square.m of the program for calculating the UH-squares, for the cases when
N = 2r , r > 1. Here, the UH-squares are defined for the set of generators
(p, s), which is used in the tensor and paired transforms. Therefore, we call
such UH-squares the tensor UH-squares.
The UH-square has size (2N − 1) × (2N − 1); therefore, we put this square
into the square [−1, 1] × [−1, 1] with the lattice (2N − 1) × (2N − 1). The
central point of the UH-square is in the central square [0, 0]. The UH-square
defines all G-rays passing through the square [0, 0].
Image Processing 361
0.04
0.5
0.02
0 0
−0.02
−0.5
−0.04
−1 −0.06
−1 −0.5 0 0.5 1 −0.05 0 0.05
0.5
0.05
0 0
−0.05
−0.5
−0.1
−1
−1 −0.5 0 0.5 1 −0.1 −0.05 0 0.05 0.1
FIGURE 6.15
Map of G-rays in the UH-square of number 8 and its central component.
For reconstruction of the image f(x, y) with high resolution, i.e. as the
discrete image fn,m , where n, m = 0 : N1 − 1, M1 − 1 and N1 , M1 > N, it
will be desired to reconstruct the values of the image at all or a few points of
intersections of G-rays inside the central square, as well as other squares.
To calculate the block-table [ψn,m ]n,m=0:(N−1) of the field functions of the
G-particles in the lattice 4 ×4, we use the code tableR FFofGrays.m. The script
Image Processing 363
is given below for the N = 4 example. Here, the 2-D array UH8 stands for the
base matrix.
% call: tableR_FFofGrays.m / A.-M. Grigoryan, 2011
N=4;
UH8=UH_square(N); % Base matrix, UH-square (2N-1)x(2N-1)
TR=zeros(N*N); % For the table of all field functions
R2=zeros(N);
m=1;
for i1=1:N
n=1;
for j1=1:N
R2=UH8(N-j1+1:N-j1+N,N-i1+1:N-i1+N);
TR(n:n+N-1,m:m+N-1)=R2; n=n+4;
end
m=m+4;
end
To calculate the matrix R in (6.22) from the base matrix Ψ, we use the
code matrixR FFofGrays.m with the following script.
% call: matrixR_FFofGrays.m / A.-M. Grigoryan, 2011
N=4;
UH8=UH_square(N); % Base matrix, or the UH-square in (6.20)
R=zeros(N*N); % Array for the matrix R in (6.22)
R2=zeros(N); k=1; NN=N*N;
for i1=1:N
for j1=1:N
R2=UH8(N-j1+1:N-j1+N,N-i1+1:N-i1+N);
R(k,:)=reshape(R2,1,NN); k=k+1;
end
end
To calculate the inverse matrix R−1 and print all of its 16 basic functions,
we use the code matrixR FFofGrays.m, which is given below.
% -------------------------------------------------------------
% call: matrixRin_FFofGrays / A.-M. Grigoryan, 2011
% -------------------------------------------------------------
matrixR_FFofGrays; % It calculates matrix R for the N=4 case
fprintf(’%16.0f \n’,det(R)); % 17128697013225
% The inverse matrix NxN (or 16x16)
Ri=inv(R);
% Represent this matrix as the block-matrix 4x4
NN=N*N;
iR=zeros(N,N,NN);
for k=1:NN
y=reshape(Ri(:,k),N,N); iR(:,:,k)=y;
end
% The 1st basis functions of R and Ri
364 CHAPTER 6: Method of Particles
For the first G-particle (0, 0), we obtain the following matrices of the first
basic functions of the transform, R and R−1 , respectively:
8 2 1 1 0.1636−0.0192−0.0049−0.0107
2 3 2 1 −0.0192−0.0500−0.0183−0.0008
ψ0,0 = 1 2 1 1 , φ0,0 = −0.0049−0.0183 0.0177 0.0056 .
1 1 1 1 −0.0107−0.0008 0.0056−0.0056
The basic functions of the G-particle (1, 2) are also calculated separately in
this code:
3 2 1 0 −0.0500−0.0120−0.0008 0.0102
2 8 2 1 −0.0120 0.1812−0.0093−0.0025
ψ1,2 =
, φ1,2 −0.0008−0.0093−0.0459−0.0219 .
=
1 2 3 2
0 1 2 1 0.0102−0.0025−0.0219 0.0177
One can notice that in matrices φ0,0 and φ1,2, the maximum values are at the
Image Processing 365
points (0, 0) and (1, 2), respectively, i.e. at the exact locations of the considered
G-particles.
Here, {fn,m } stands for the image to be reconstructed, and ψn,m (i, j) are co-
efficients c(i, j, n, m) defining the number of rays passing through the particle
(i, j). The 4-D matrix ||c(i, j, n, m)|| of size (N × N × N × N ) can be rep-
resented in the form of a 2-D matrix of size (N 2 × N 2 ). We denote this 2-D
matrix by R = ||rk,l||, as shown in (6.13) and (6.22) for the example when
N = 4. We here remind the reader that the matrix R is composed of all N 2
field functions (N × N ) written row-wise in the form of 1-D vectors,
r(i−1)N+j,(n−1)N+m = c(i, j, n, m), i, j, n, m = 0 : (N − 1).
The matrices of data a(i, j) and fn,m can also be written row-wise
ai,j → a(i−1)N+j = ai,j , fn,m → f(n−1)N+m = fn,m ,
in the form of 1-D vectors. Equation 6.24 can therefore be written as
2
NX −1
ak = rk,lfl , k = 0 : (N 2 − 1). (6.25)
l=0
Example 6.4 In the square [0, 1]×[0, 1] we consider the lattice 64×64 and the
following image composed randomly of ten rectangles. Each of the rectangles
is given by coordinates (xk,1, yk,1 ) and (xk,2 , yk,2), k = 1 : 10, as shown in
Table 6.7. The coordinates are written in integer form, i.e. they should be
normalized by the factor of N = 64. The intensities of these rectangles are
given in the last column.
TABLE 6.7
Data of 10 rectangles
k xk,1 yk,1 xk,2 yk,2 Rk
1 10 15 20 30 1
2 12 40 30 50 2
3 40 40 50 60 6
4 45 10 50 30 3
5 15 20 30 35 4
6 24 20 40 35 2
7 32 40 38 50 5
8 5 15 10 20 7
9 50 20 55 25 2
10 10 30 25 40 3
These ten rectangles are shown in Figure 6.16 in part a, along with recon-
struction of the image from 3N/2 = 96 projections in part b.
10
0.8 3
2 7 20
0.6
10 30
5 6
0.4 40
1 9
4
8
50
0.2
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
(a) (b)
FIGURE 6.16
(a) Ten rectangles on the lattice 64 × 64 and (b) the reconstructed image.
We also describe another example, where a few rectangles are shifted and
do not lie on the lattice. For that, we modify the coordinates of five rectangles,
as shown in Table 6.8.
Figure 6.17 shows ten rectangles, five of which are not on the lattice,
in part a. The result of image reconstruction from 96 projections is shown
Image Processing 367
TABLE 6.8
Data of five shifted rectangles
k xk,1 yk,1 xk,2 yk,2 Rk
2 12 40.5 30 50 2
3 40 40.25 50 60 6
4 45.35 10 50 30 3
6 24 20 40 35.2 2
9 50 20 55.45 25 2
in part b. One can notice that the rectangles are well reconstructed with
10
0.8 3
2 7 20
0.6
10 30
5 6
0.4 40
1 9
4
8
50
0.2
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
(a) (b)
FIGURE 6.17
(a) Ten rectangles and the lattice 64 × 64 and (b) the reconstructed image.
their exact edges, and additional work can be done to remove the effect of
shifting the rectangles. The result of reconstruction will look better when
reconstructing with high resolution. Figure 6.18 shows the same ten rectangles
and the lattice 128×128 on the square [0, 1]×[0, 1] in part a. The result of image
reconstruction from 192 projections is shown in part b. The 2nd rectangle is
now on the lattice and does not cause the error of reconstruction.
% ----------------------------------------------------------
% call: reconstruction_byR / A.-M. Grigoryan, 2012
% ----------------------------------------------------------
N=64;
R=zeros(N,N,N,N); % 4-D matrix R
N_rect=10;
MNrects=[10 15 20 30
12 40 30 50
368 CHAPTER 6: Method of Particles
20
0.8 3
2 7 40
0.6
10 60
5 6
0.4 80
1 9
4
8
0.2 100
120
0
0 0.2 0.4 0.6 0.8 1 20 40 60 80 100 120
(a) (b)
40 40 50 60
45 10 50 30
15 20 30 35
24 20 40 35
32 40 38 50
5 15 10 20
50 20 55 25
10 30 25 40];
Matr_rect=MNrects/N;
E=[1 2 6 3 4 2 5 7 2 3]; % intensities of rectangles
% Plot the lattice NxN and rectangles -----------------
figure;
colormap(gray);
subplot(1,2,1); hold on
draw_grid; axis image;
h_x1=xlabel(’(a)’); set(h_x1,’FontSize’,12);
S_title=sprintf(’%g rectangles on %gx%g’,N_rect,N,N);
h_title=title(S_title);
% ------------------------------------------------------
ps=ps_generators(N);
L=N+N/2; % number of projections
A=zeros(N,N); % for sums a((i,j) of fields of particles
for k=1:L % loop for (p,s)-projections
p=ps(k,1); s=ps(k,2);
[p1,s1,t]=tensor_scheme_pst(p,s,N);
Len_t=length(t);
for it=1:Len_t % loop for (p,s,t)-G-rays
sum_A=fieldpst_tensor_scheme(p1,s1,t(it),N,N_rect,Matr_rect,E);
f=general_scheme_pst2(p1,s1,t(it),N);
Image Processing 369
f_sz=size(f);
for nf=1:f_sz(2)
m1=f(1,nf); n1=f(2,nf); L1=f(3,nf);
A(m1,n1)=A(m1,n1)+sum_A/L1; % Eq. 6.24
end
%========= calculate the 4-D matrix R ===========
for nf=1:f_sz(2)
for mf=1:f_sz(2)
R(f(1,nf),f(2,nf),f(1,mf),f(2,mf))=...
R(f(1,nf),f(2,nf),f(1,mf),f(2,mf))+1;
end
end
%=================================================
end % for (p,s,t)-rays
end % for (p,s)-projection
fprintf(’ 4-D Matrix R has been calculated \n’);
NN=N^2;
R2=reshape(R,NN,NN);
a=reshape(A,NN,1);
x=R2\a; % instead of x=inv(R2)*a; % Eq. 6.26
X=reshape(x,N,N); % reconstructed image
% Plot the reconstructed image
subplot(1,2,2);
imagesc(X); axis image;
S_title=sprintf(’%gx%g: Covering by %g projections ’,N,N,L);
h_title=title(S_title);
h_x2=xlabel(’(b)’); set(h_x2,’FontSize’,12);
% print -dps Figure6_16.ps
% --------------------------------------------------------------------
These programs are written not only for the tensor scheme of scanning,
when the set of 3N/2 generators (p,s) is defined as {(1,s)},{(2p,1)},
and sets of G-rays and A-rays correspond to these (p,s)-projections.
Arbitrary scheme of scanning can be used, including the fan scheme,
and not only integer values of generators (p,s) can be considered.
370 CHAPTER 6: Method of Particles
However in this section, these codes are used for the tensor scheme.
% ====================================================================
% call: tensor_scheme_pst.m
function [p,s,t]=tensor_scheme_pst(p,s,N)
N2=N/2;
delta=1/N; delta2=delta/2;
if p*s==0
t_min=delta2; t_max=1-delta2;
else
if p>N2
p=p-N; t_min=p+delta; t_max=1-delta;
elseif s>N2
s=s-N; t_min=s+delta; t_max=1-delta;
else
ps=max(p,s); t_min=delta; t_max=1+ps-delta;
end
end
t=t_min:delta:t_max;
% ====================================================================
% call: general_scheme_pst2.m
% Brief description:
% G-ray is represented as a set of triplets [x,y,d] of image-elements
% and lengths d of intersections of this ray with [x,y]. The triplets
% are written in the 3-D array F={f(1,2,3,:)=(x,y,d,:)}.
% Algorithm is simple:
% 1. Calculate all intersections with horizontal lines of the grid.
% 2. Calculate all intersections with vertical lines of the grid.
% 3. Unite these coordinates in array xy=[x y].
% 4. Sort xy by the first coordinate.
% 5. Find the coordinates of the image-elements (IE) along the G-ray.
% 6. Calculate the lengths of intersection of the ray with these IEs.
% If the intersection is zero or close to zero (as eps*100), then
% it is considered that the G-ray does not pass through the IE.
% The small value (eps*100) should be chosen more accurately.
% --------------------------------------------------------------------
function F=general_scheme_pst2(p,s,t,N)
t=-t;
delta=1/N;
eps100=eps*100;
ones1N=ones(1,N)*delta;
% 1,2
if abs(p)<eps100; % (p==0) in the tensor scheme
f=zeros(3,N);
x=-t/s;
if x>0 & x<=1
x_n=ceil(x/delta);
end
f(2,:)=ones(1,N)*x_n;
f(1,:)=1:N; f(3,:)=ones1N;
Image Processing 371
F=f; return
elseif abs(s)<eps100; % (s==0) in the tensor scheme
f=zeros(3,N);
y=-t/p;
if y>0 & y<=1
y_n=ceil(y/delta);
end
f(1,:)=1+N-ones(1,N)*y_n;
f(2,:)=1:N; f(3,:)=ones1N;
F=f; return
else % (p,s)~=(0,0) in the tensor scheme
a(1,:)=0:N; a=a*delta;
in_x=1; in_y=1; x=[];y=[];
for i1=1:length(a)
ai1=a(i1);
xn=(-t-p*ai1)/s;
if(xn >=0 & xn<=1)
x(:,in_x)=[xn;ai1]; in_x=in_x+1;
end
yn=(-t-s*ai1)/p;
if(yn >=0 & yn<=1)
y(:,in_y)=[ai1;yn]; in_y=in_y+1;
end
end
% 3.
xy=[x y];
% 4.
t=sort_data(xy); sz=size(t);
% 5.
t=t/delta;
for i1=1:sz(2)-1
i2=i1+1;
ff=(t(1,i2)+t(1,i1))/2; f(2,i1)= ceil(ff);
ff=(t(2,i2)+t(2,i1))/2; f(1,i1)= N-ceil(ff)+1;
end
xs(1,:)=t(1,:); ys(1,:)=t(2,:);
% 6.
m=1;
for i1=1:sz(2)-1
i2=i1+1;
sd=(xs(i2)-xs(i1))^2+(ys(i2)-ys(i1))^2;
f(3,i1)=sqrt(sd)*delta;
% consider only image elements with length > eps*100
if f(3,i1)>eps100
F(:,m)=f(:,i1); m=m+1;
end
end
end
372 CHAPTER 6: Method of Particles
elseif abs(s)<eps100
y=t/p;
if y>ry2 | y<ry1
Length_inter=[]; F=[];
else
Length_inter=rx2-rx1; F=[rx1,y;rx2,y];
end
else
x=[]; y=[];
for i1=1:2
i12=2*i1; ri12=rec(i12);
xn=(t-p*ri12)/s;
if(xn >=rx1 & xn<=rx2)
x=[x [xn; ri12]];
end
ri12=rec(i12-1);
yn=(t-s*ri12)/p;
if(yn >=ry1 & yn<=ry2)
y=[y [ri12;yn]];
end
end
xy=[x y];
if isempty(xy)
Length_inter=[]; F=[]; return
end
xy=sort_data(xy);
end
% calculate the length of the intersection
if (exist(’xy’)==1)
x1=xy(1,1); x2=xy(1,end);
y1=xy(2,1); y2=xy(2,end);
Length_inter=sqrt((x2-x1)^2+(y2-y1)^2);
F=[x1 y1;x2 y2];
% do not consider such intersection if length<eps*100
if Length_inter<eps100
Length_inter=[]; F=[];
end
end
% =================================================================
function f=sort_data(x)
sz=size(x);
[y,I]=sort(x(1,:));
for i1=1:sz(2)
f(:,i1)=x(:,I(i1));
end
% =================================================================
In the examples considered above for the G- and A-particles on the lattice
4 × 4, the reconstruction of the image by FTGP has been obtained by using
the inverse matrix R−1 . The described program reconstruction byR.m also
accomplishes the calculation of this inverse matrix. The calculation of this
matrix can be separated and calculated and stored in advance. It is clear
that the calculation of such matrix (N 2 × N 2 ) is difficult for large values
of N = 2r , when r > 2. For instance, our personal computer can perform
the reconstruction of the image with maximal size 128 × 128, when using this
program. The N = 256 case faces a lack of the required memory when running
the program, and therefore new methods of calculation should be applied when
programming in MATLAB
R
. In the main program reconstruction byR.m, the
command x=R2\a is used instead of calculation of the inverse matrix, when
using the command x=inv(R2)*a. We also mention the minimization techniques
of nonlinear programming [36], which may be applied for calculating the vector
x.
The direct method of FTGP may not be very effective for high values of N.
We therefore consider another, more effective solution of the problem, without
calculation of the inverse matrix R−1 .
X N−1
N−1 X
a(i, j) = fn,m ψn,m (i, j), i, j = 0 : (N − 1). (6.27)
m=0 n=0
As mentioned above, each field function can be calculated by the base field
matrix, ψn,m (i, j) = Ψ(N −1 −n+i, N −1 −m+j), i, j = 0 : N −1. Therefore,
we have the following property for the field function of the G-particle (n, m):
The transform of the image in (6.27) can be written as the linear convolution
X N−1
N−1 X
a(i, j) = (f ∗ ψ)(n, m) = fn,m ψ(i − n, j − m), (6.29)
m=0 n=0
where i, j = 0 : (N −1). The simple way to solve this 2-D convolution equation
is based on the 2-D discrete Fourier transform. Because the base field matrix
Ψ is of size (2N − 1) × (2N − 1), we will use the zero padding to extend the
image fn,m to this size. We denote the extended image by f˜n,m . Then, the
Image Processing 375
following is valid:
X 2N−1
2N−1 X
a(i, j) = f˜n,m ψ(i − n, j − m)
m=0 n=0
X 2N−1
2N−1 X (6.30)
= f˜n,m Ψ(N − 1 + i − n, N − 1 + j − m)
m=0 n=0
i, j = 0 : (N − 1).
Thus, the value of the 2-D linear convolution a(i, j) can be calculated from
the incomplete 2-D circular convolution of the extended image f˜n,m with the
base field matrix Ψ. To illustrate this property of zero padding, we describe
the following example.
Example 6.5 For the N = 4 case, we consider the script of the program
run ccN4.m.
% call: run_ccN4.m
% f=round(4*rand(4)); % random input 4x4
f=[ 1 3 2 1
0 1 2 2
0 4 3 2
3 0 3 3];
UH8=[ 1 1 1 1 0 0 1
1 1 2 1 0 1 0
1 2 3 2 1 0 0
1 1 2 8 2 1 1
0 0 1 2 3 2 1
0 1 0 1 2 1 1
1 0 0 1 1 1 1];
% The direct method of 2-D convolution:
R=zeros(4);
for i1=1:4
for j1=1:4
R=UH8(4-1+j1-3:4+j1-1,4-1+i1-3:4+i1-1);
A1(j1,i1)=sum(sum(R.*f));
end
end; A1
% 48 61 49 34
% 40 55 66 46
% 32 68 69 56
% 38 33 63 68
% The method of 2-D circular convolution:
F=zeros(7);
F(1:4,1:4)=f(:,:);
for i1=1:4
for j1=1:4
s=0;
for m1=1:7
376 CHAPTER 6: Method of Particles
m2=4-1+j1-3+m1-1;
if m2<1 m2=m2+7; end
if m2>7 m2=m2-7; end
for n1=1:7
n2=4-1+i1-3+n1-1;
if n2<1 n2=n2+7; end
if n2>7 n2=n2-7; end
s=s+UH8(m2,n2)*F(m1,n1);
end
end
A2(j1,i1)=s;
end
end; A2
X 2N−2
2N−2 X
Ap,s = a(i, j)W pi+sj
i=0 i=0
X 2N−2
2N−2 X X 2N−2
2N−2 X
= f˜n,m Ψ(N − 1 + i − n, N − 1 + j − m)W pi+sj
m=0 n=0 i=0 i=0
X 2N−2
2N−2 X X 2N−2
2N−2 X
= f˜n,m Ψ(i, j)W p(i−N+1+n)+s(j−N+1+m)
m=0 n=0 i=0 i=0
X 2N−1
2N−2 X X 2N−2
2N−1 X
= f˜n,m W pn+sm
Ψ(i, j)W pi+sj · W −(N−1)(p+s)
m=0 n=0 i=0 i=0
−(N−1)(p+s)
= F̃p,s Ψp,s · W
where we denote the (2N −1)×(2N −1)-point DFTs of the convolution a(n, m),
extended image f˜, and base matrix Ψ by Ap,s , F̃p,s , and Ψp,s , respectively.
Thus, we obtain the following formulas for image reconstruction:
Ap,s (N−1)(p+s)
F̃p,s = W , p, s = 0 : (2N − 1), (6.31)
Ψp,s
Image Processing 377
and
X 2N−1
2N−1 X
fn,m = F̃p,s W −(np+ms) , n, m = 0 : (N − 1). (6.32)
p=0 s=0
This formula can be used if the 2-D DFT of the base field matrix does
not have zero values. This matrix and its 2-D DFT can be calculated for any
values of N = 2r , and the simple program can be written to verify the fact
that Ψp,s 6= 0, for all (p, s).
As an example, we consider the DFT of the UH-square for the N = 4
case. The required calculations are accomplished by using the program with
the following script.
% call: checkzeros_inDFTofUHsquare.m
UH8=[ 1 1 1 1 0 0 1
1 1 2 1 0 1 0
1 2 3 2 1 0 0
1 1 2 8 2 1 1
0 0 1 2 3 2 1
0 1 0 1 2 1 1
1 0 0 1 1 1 1];
FUH8=fft2(UH8);
mn=min(min(abs(FUH8))); % 0.1491
R_ofFUH8=real(FUH8)
56.0000 -14.0036 4.6250 -1.1213 -1.1213 4.6250 -14.0036
-14.0036 0.5625 -0.3351 -0.0332 4.7409 -7.1528 24.0858
4.6250 -0.3351 -2.3107 3.6860 -4.4058 7.8358 -7.1528
-1.1213 -0.0332 3.6860 -8.7518 3.0785 -4.4058 4.7409
-1.1213 4.7409 -4.4058 3.0785 -8.7518 3.6860 -0.0332
4.6250 -7.1528 7.8358 -4.4058 3.6860 -2.3107 -0.3351
-14.0036 24.0858 -7.1528 4.7409 -0.0332 -0.3351 0.5625
I_ofFUH8=imag(FUH8)
0 -6.7438 5.7995 -4.9129 4.9129 -5.7995 6.7438
-6.7438 0.7053 -1.4683 0.1454 -5.9449 3.4446 -0.0000
5.7995 -1.4683 10.1237 -4.6221 2.1217 0.0000 -3.4446
-4.9129 0.1454 -4.6221 4.2147 0 -2.1217 5.9449
4.9129 -5.9449 2.1217 0 -4.2147 4.6221 -0.1454
-5.7995 3.4446 -0.0000 -2.1217 4.6221 -10.1237 1.4683
6.7438 0.0000 -3.4446 5.9449 -0.1454 1.4683 -0.7053
The real and imaginary parts of the DFT of the UH-square are printed
separately, and one can see that there is no zero value in this DFT. In absolute
scale, the minimum number of the DFT is 0.1491.
Below is the remaining part of the script, which calculates the DFT of the
UH-square of number 26 for the N = 8 case. The minimum number of the
DFT is 0.6347 in absolute scale.
UH26=[ 1 0 0 1 1 0 0 1 1 3 1 1 0 0 1
378 CHAPTER 6: Method of Particles
0 1 0 0 2 0 0 1 2 2 2 0 0 1 0
0 0 1 0 1 1 0 1 3 2 1 0 1 0 0
1 0 0 1 0 2 0 1 4 2 0 1 0 0 1
2 2 1 0 1 1 1 2 4 1 1 0 1 2 2
2 3 3 3 1 1 2 3 4 1 1 3 4 5 5
0 0 1 2 4 4 4 6 6 6 7 6 4 2 1
1 1 1 1 2 5 10 26 10 5 2 1 1 1 1
1 2 4 6 7 6 6 6 4 4 4 2 1 0 0
5 5 4 3 1 1 4 3 2 1 1 3 3 3 2
2 2 1 0 1 1 4 2 1 1 1 0 1 2 2
1 0 0 1 0 2 4 1 0 2 0 1 0 0 1
0 0 1 0 1 2 3 1 0 1 1 0 1 0 0
0 1 0 0 2 2 2 1 0 0 2 0 0 1 0
1 0 0 1 1 3 1 1 0 0 1 1 0 0 1 ];
FUH26=fft2(UH26);
mn=min(min(abs(FUH26))) % 0.6347
It is not difficult to verify that the 2-D DFT of the UH-squares does
not have zeros (see also Table 6.9, for other values of N = 2r , r > 3. The
number, k, of these squares UH(k) is also shown in the table. We here omit
the analytical proof of this fact and leave it to the reader.
TABLE 6.9
Tensor UH(k)-squares
N k min{|Ψp,s )|}
16 98 0.1585
32 386 0.1204
64 1538 0.0283
128 6146 0.0385
256 24578 0.0346
512 98306 0.0086
1024 393218 0.0004
We consider the base matrix Ψ as the function φ(n, m) with the center at
(0, 0), i.e.
Problems
Problem 6.1 (Model 1) Consider the symmetric tensor scheme of scan-
ning, when 2N − 1 generators (p, s) are used from the following set:
1
JN,N = {(1, s), s = 0 : (N − 1)} ∪ {(p, 1), p = 0, 2 : (N − 1)}.
A. Determine the base matrix Ψ of G-particles in the N = 4 case. Show
that this matrix Ψ is the UH-square.
B. Determine the field functions of the G-particles (1, 1) and (3, 2) in the
N = 4 case.
C. All N 2 field functions of G-particles can be written row-wise into the
matrix N 2 × N 2 . Determine such matrix for N = 4.
Problem 6.2 Consider the symmetric tensor scheme of scanning with the set
1
of generators JN,N . Determine the base matrix Ψ of G-particles in the N = 8
case. Show that this matrix Ψ is the UH-square.
Problem 6.3 Consider the symmetric tensor scheme of scanning with the set
1
of generators JN,N . Show that, similar to the tensor scanning scheme, the 4-
dimensional matrix R = ||c(i, j, n, m)|| provides the representation in the form
of the linear convolution. Here the coefficients c(i, j, n, m) equal the number
of rays passing through the particles (i, j) and (n, m) at the same time.
Image Processing 381
Problem 6.4 Write the code and show that reconstruction of the image N ×
N, where N is a power of two, is possible when using the scanning scheme
1
with the set JN,N .
Problem 6.7 Write the code and show that reconstruction of the image N ×
N, where N is a power of two, is possible when using the scanning scheme
2
with the set JN,N .
The solutions of the above problems show that different scanning schemes can
be used with a number of projections greater or less than 3N/2.
Write the code and find the minimum value of M = M (N ) for which recon-
struction of the image N × N is possible. Here, N is a power of two.
Problem 6.9 (Model 4) Given integers M > 0 and K > 0, consider the
following scheme of scanning, when M + K − 1 generators (p, s) are used from
the following set:
4
JN,N = {(1, s), s = 0 : (M − 1)} ∪ {(p, 1), p = 0, 2 : (K − 1)}.
Write the code and find the minimum values of M = M (N ) and K = K(N )
for which reconstruction of the image N × N is possible. Here N is a power
of two.
382 CHAPTER 6: Method of Particles
Write the code and find out if the exact reconstruction of the image N × N
is possible with this random scanning scheme. Here, N is a power of two.
Determine for which values of M the reconstruction can be achieved. Provide
examples and explain the results. (Note that p and s may have non-integer
values.)
7
Methods of Averaging Projections
When all data of random rectangles, xk , yk , ∆xk , and ∆yk , are integer multi-
ples of ∆x = 1/N, the image can be reconstructed exactly in the form of the
corresponding discrete analog {fn,m } of this image. Given (n, m), the value of
fn,m equals the average image intensity in the square [n, m]. We now consider
the case when data of such rectangles may not be integer multiple to 1/N, i.e.,
when one or a few rectangles of the image are not divided by the Cartesian
lattice N × N by small squares of size 1/N × 1/N each. In this case, we say
that the image f(x, y) is not on the lattice, and it is shifted.
As a example, Figure 7.1 shows the image f(x, y) with seven random rect-
angles, which is not on the Cartesian lattice 256 × 256. The reconstructed
image of the size 256 × 256 is also shown. One can observe that although the
rectangles with their straight edges have almost been reconstructed and can
be observed well, there are many “noisy” points in the image. This image
therefore needs to be processed in order to filter such a noise, as is done, for
383
384 CHAPTER 7: Methods of Averaging
0.8 50
6
0.6 100
5
2
0.4 7 150
3 1
4 200
0.2
0 250
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 4 2 14 11 9 13 5 cpu time/rect=4.90 min
We first apply this idea on the discrete images, and then on images modeled
by random rectangles in the square [0, 1]×[0, 1]. To all points in the rectangles,
Image Processing 385
as well as outside them, some values of intensity are assigned. The resulting
image is smooth, because of averaging.
This method can be described by considering the 2-D Fourier transform
of the image f(x, y) in the polar system of coordinates in the frequency do-
main [30]. Indeed, let us consider the line-integral of the image
Z Z1Z1
w(t) = wθ (t) = f(x, y)dlθ (t) = f(x, y)δ(x cos θ + y sin θ − t)dxdy
0 0
along the line lθ (t) = {x cos θ + y sin θ = t}. The Fourier transform of w(t)
coincides with the 2-D Fourier transform of the image along the line ω2 =
ω1 tan(θ) in the frequency domain (ω1 , ω2 ). In other words,
Z1Z1
F (w1 cos θ, w1 sin θ) = f(x, y)e−j(xω1 cos θ+yω1 sin θ) dxdy =
0 0
Z∞Z1Z1 Z∞
−jω1 t
f(x, y)e δ(x cos θ + y sin θ − t)dxdydt = wθ (t)e−jω1 t dt = Wθ (ω1 ).
−∞ 0 0 −∞
This is the statement of the Fourier Slice Theorem. Therefore, by using the
inverse Fourier transform, the image can be written as
Zπ Z∞
1 1
f(x, y) = Wθ (ω1 )|ω1 |ejω1t dω1 dθ, (7.3)
2π 2π
0 −∞
where t = x cos θ + y sin θ. For a given angle θ, the same value of the integral
Z∞
1
bθ (t) = Wθ (ω1 )|ω1 |ejω1t dω1
2π
−∞
will be added to the image f(x, y) at all points (x, y) on the line lθ (t) =
{x cos θ + y sin θ = t}. This value is the inverse Fourier transform of the pro-
jection amplified by the filter |ω1 |. Therefore, Equation (7.3) describes the
process of filtered backprojection,
Zπ
1
f(x, y) = bθ (x cos θ + y sin θ)dθ.
2π
0
The realization by this formula requires the full, or infinite number of projec-
tions {wθ (t); θ ∈ [0, π]} and convolution with the impulse response h(t), which
is defined by the frequency characteristics H(ω1 ) = |ω1 |, where ω1 ∈ (−∞, ∞).
These two complex operations cannot be accomplished exactly in practice,
386 CHAPTER 7: Methods of Averaging
when assuming that there is no aliasing for the projection data when sampling
with a period T < π/ω0 . To smooth the sharp cutoffs at ±ω0 and reduce the
ringing artifacts in the reconstruction, different smoothing window functions
can be used to modify the Ran-Lak filter H̃(ω1 ). For instance, we consider
the generalized Hamming window [29, 30]
α + (1 − α) cos(πω1 /ω0 ), when ω1 ∈ (−ω0 , ω0 ),
H(ω1 ) = |w1 | ·
0, otherwise,
where the value of α is selected from the interval (0, 1). As an example, Fi-
gure 7.2 shows the Ran-Lak filter with cutoff frequency ω0 = 1.45rad/s, the
1.5
|ω1|
smoothing window (α=0.5)
1
0.5 ω0=1.45
H(ω1)
0
−2 −1.5 −1 −0.5 0 0.5 1 1.5 ω1 2
FIGURE 7.2
Modification of the Ran-Lak filter by Humming smoothing window.
Humming window with the parameter α = 0.5, and the function H(ω1 ).
and N/2k , for the kth series of generators, where k = 2, 3, ..., r. This property
explains the main difference between the paired transform-based method of
image reconstruction and the method of backprojection. In the method of
backprojection, direction images also are used, and for many projections, these
images are incomplete. This means they are not calculated for all points on
the Cartesian grid N × N. The number of such images equals the number of
projections, and the value of each of these images at the point (n, m) is set
to be equal to the average (and filtered) value of the projection along the ray
passing through this point. This rough assumption does not allow for accurate
reconstruction of the image, even for a large number of projections.
For example, consider the case when the full set of 2(128)−1 measurements
are used for calculating the projection by the angle arctan(2) of the image on
the lattice 128 × 128. The corresponding direction image in BP will contain
these 255 values along the parallel lines. In the paired method, from these
255 measurements, 128 values of the splitting-signal in tensor representation,
and then 64 values in paired representation are calculated and used in the
direction image. The number of projections, or direction images, for image
reconstruction by BP is considered to be 180, assuming the uniform change
of the angle of projections by 1 degree. The projections which are used in the
tensor and paired methods are calculated by the angles
which differ from the angles used in BP. It follows from the principle of super-
position, that the number of required projections equals 192, from which 382
direction images are calculated for image reconstruction by the paired method.
All direction images in BP are non-negative, and in paired representation the
direction images have both positive and negative values. The BP method re-
sults in a smooth image, and the paired method allows reconstruction of the
discrete image (noise is not considered).
As an example, Figure 7.3 shows the discrete tomo image of size 256 × 256
in part a, together with the results of image reconstruction by the filtered
backprojection in b and c, when respectively 384 and 360 projections are
used at angles equally spaced between 0 and 180 degrees. The mean-square-
root error of image reconstruction equals 0.010308 in (c) and 0.011086 in
(d). One can notice that many details on these images are not seen well. For
comparison, the reconstruction of the image by the paired transform with the
same number, 360, of projections is shown in d. The error of reconstruction
equals 0.002065 and 360 angles are defined by the frequency-points (p, s) of
the set of generators J256,256, whose splitting-signals have high energies,
255
1 X 2
Ep,s = f > 8773.85.
2562 t=0 p,s,t
The graph of the energy function Ep,s is given in Figure 7.4, where the
generators (p, s) are ordered, as written in the set J256,256, i.e., the first is
388 CHAPTER 7: Methods of Averaging
FIGURE 7.3
(a) The image 256 × 256. The image reconstruction by the filtered backpro-
jection algorithm by (b) 384 and (c) 360 projections (by MATLAB
R
function
iradon.m), and (d) reconstruction by the 2-D DPT with 360 projections.
4
x 10
1.25
1.2
1.15
1.1
1.05
1
0.95
0.9
0.85
0 50 100 150 200 250 300 350
FIGURE 7.4
The energy curve of all 384 splitting-signals of the tomo image.
(1, 0), the 257-th is (0, 1), and the last is (254, 1). The splitting-signal genera-
ted by (p, s) = (0, 1) has the highest energy 12290.08, and the splitting-signal
with generator (1, 0) is the second with high energy signal, E(1, 0) = 9719.93.
These two signals are defined by the vertical and horizontal projections, res-
pectively. It is interesting to note that the next high-energy splitting-signal
Image Processing 389
with energy 8896.03 is the signal generated by (1, 128), not the signal defined
by the diagonal projection with E(1, 1) = 8827.80. The value of the minimum
energy of the splitting-signals equals 8771.83.
In the case when N is prime, the image fn,m can be reconstructed from
f(x, y) by direction images of number N + 1,
"N−1 #
1 X
fn,m = f1,s,(n+sm) mod N + f0,1,m − N E[f], n, m = 0 : (N − 1).
N s=0
l2
15 15
5
l1
10 10
0
5 5
l3
−5
0 0
−5 0 5 0 5 10 15 0 5 10 15
(a) (b) (c) T2,1
FIGURE 7.5
(a) The grid Y16,16 with 16 points on the lines l1 , l2 , and l3 , and the grid X16,16
with (b) 8 points on the line l1 , and (c) 16 points of the group T2,1 .
1 X pϑ (np + ms)
fˆn,m = ,
M card(lϑ (np + ms)) (7.4)
ϑ=ϑ(p,s)∈Φ(N)
n, m = 0 : (N − 1),
MSR=0.009257 MSR=0.009520
50 50
100 100
150 150
200 200
250 250
50 100 150 200 250 50 100 150 200 250
(a) 256x256 (b) 257x257
FIGURE 7.6
The reconstruction of the tomo image of size (a) 256×256, by 384 projections,
and (b) 257 × 257, by 258 projections.
The values of v(t) can be calculated from the line-integrals w(t) of the image
f(x, y) along the G-rays of the (p, s)-projection, as described in Chapter 3.
Function card(lϑ (t)) is used for the cardinality, or number of grid points on
these lines. The weight card(lϑ (t)) of the projection pϑ (t) takes values from
the interval [1, N ], and the higher the frequency (p, s) generating the angle ϑ,
the smaller this weight. Figure 7.6 shows the result of image reconstruction
in part a, for the 256 × 256 case, and in b, for the 257 × 257 case. The mean-
square-root error of image reconstruction equals 0.009257 in (a) and 0.009520
in (b). The obtained reconstructions are the high-quality images with all fine
details of the original image. The time data from running MATLAB-based
codes on a personal computer with Intel Core Duo processor at 2.99 GHz
speed are equal to 4.2 min and 3 min, for calculating the reconstruction for
images 256 × 256 and 257 × 257, respectively.
Below is the script of the program bptt tomo256book.m, which is used to
accomplish the above described tensor method of backprojection of the tomo
392 CHAPTER 7: Methods of Averaging
image 256 × 256, which is shown in Figure 7.6 in part a. The image seen
when backprojecting only one (p, s)-projection is calculated by the function
projection cal1.m. The concept of tensor representation is considered with
direct calculation of the coordinates of points (x, y) on the grid N × N, which
lie on A-rays of the projection. Namely, for a given (p, s)-projection and each
integer t from [0, N − 1], the line-integrals, or sums of the image along the
coordinates of the following set of A-rays
are calculated separately. Each such set of rays determines the corresponding
component of the tensor transform, fp,s,t .
%==================================================
% call: bptt_tomo256book.m
% Backprojection method with 3N/2 specified angles.
% Function "projection_cal1.m" is used to calculate
% the image back-projected by one (p,s)-projection.
%
% Art Grigoryan, 07/21/2010, EE UTSA
%==================================================
N=256;
fid=fopen(’tomo256.img’,’rb’);
X=fread(fid,[N,N]); fclose(fid); clear fid; X=X’;
% The set of generators (p,s)
L=N+N/2;
Jps=ones(2,L);
Jps(1,1:N)=0:N-1; Jps(2,N+1:end)=0:2:N-2;
% Reconstruction of the image
image_out=zeros(N);
for k=1:L
p=Jps(1,k); s=Jps(2,k);
image_out=image_out+projection_cal1(X,p,s,N);
end
image_out=image_out/L; % MSR=0.009257
% Display the images
figure
subplot(1,2,1); imshow(X,[]);
subplot(1,2,2); imshow(image_out,[]);
% ------------------------------------------------
function image_back=projection_cal1(X,p,s,N)
image_back=zeros(N);
TN=0:N:max(p,s)*N;
ps1=p+s;
for t=0:N-1
value=zeros(1,ps1); % for line-integrals
L=zeros(1,ps1); % for number of IE
save_xy=zeros(2,ps1,ps1); % for coordinates of IE
np=0;
Image Processing 393
for n=1:N
ms=0;
for m=1:N
t_see=np+ms;
k=floor(t_see/N); k1=k+1;
t1=t_see-TN(k1);
if t1==t
Lk1=L(k1)+1; L(k1)=Lk1;
save_xy(1,k1,Lk1)=m;
save_xy(2,k1,Lk1)=n;
value(k1)=value(k1)+X(m,n);
end
ms=ms+s;
end
np=np+p;
end
value_projected=value(1:k1)./L(1:k1);
for k2=1:k1
for n=1:L(k2)
x_onray=save_xy(1,k2,n);y_onray=save_xy(2,k2,n);
image_back(x_onray,y_onray)=value_projected(k2);
end
end
end
% ==============================================================
TABLE 7.1
Integer data of rectangles
k x0k yk0 ∆x0k ∆yk0 Rk
1 18 19 6 15 9
2 29 29 14 25 6
3 39 39 18 18 13
4 41 14 17 17 3
5 14 38 2 10 10
6 36 11 10 8 15
7 24 9 7 25 4
Figure 7.7 shows seven rectangles that compose the image f(x, y) (on the
left), together with the gray-scale discrete image fn,m (on the right). The re-
construction fˆn,m of the image f(x, y) by the described tensor method, when
394 CHAPTER 7: Methods of Averaging
10
0.8 2
20
0.6 3
5
30
0.4 2
40
1
50
0.2 4
6
7
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
intensities: 9 6 13 3 10 15 4
FIGURE 7.7
The image with seven rectangles and gray-scale image of size 64 × 64.
10
20
30
40
50
60
10 20 30 40 50 60
(a) (b)
FIGURE 7.8
The reconstruction of the image (a) by 96 projections (without any filtering),
and (b) by 100 projections in BP method with the cropped Ram-Lak filter.
Image Processing 395
Below is the main part of the program bptt rectangles.m, which accomp-
lishes the reconstruction of the image with the tensor method described by
(7.4), as well as the reconstruction by the filtered BP method with the ramp,
or Ram-Lak filter, which is shown in Figure 7.8.
%====================================================================
% call: bptt_rectangles.m
% Backprojection methods with 3N/2 specified angles.
% Art Grigoryan, 07/21/2010, EE UTSA
%==================================================
N=64; many_rectangles=7;
data_allrect=zeros(many_rectangles,5);
data_allrect=[ 18 19 6 15 9
29 29 14 25 6
39 39 18 18 13
41 14 17 17 3
14 38 2 10 10
36 11 10 8 15
24 9 7 25 4];
% composition of the gray-scale image fd(x,y) from rectangles
imageSQ_model=zeros(N,N);
for k=1:many_rectangles
data_1rect=data_allrect(k,:);
x=data_1rect(1); dx=data_1rect(3);
y=data_1rect(2); dy=data_1rect(4);
d_intensity=data_1rect(5);
x1=x+dx; y1=y+dy;
imageSQ_model(x:x1,y:y1)=imageSQ_model(x:x1,y:y1)+d_intensity;
end
imageSQ_model=imageSQ_model(:,N:-1:1);
% Art Method [96 projections] ------------------
X=imageSQ_model’;
% The set of generators (p,s)
L=N+N/2;
Jps=ones(2,L);
Jps(1,1:N)=0:N-1; Jps(2,N+1:end)=0:2:N-2;
% Reconstruction of the image
image_out=zeros(N);
for k=1:L
p=Jps(1,k); s=Jps(2,k);
image_out=image_out+projection_cal1(X,p,s,N);
end
image_out=image_out/N;
% BP method [100 projections] -------------------
f=linspace(0,180,100);
Radon_ofX = radon(X,f); % 95x100
X_iradon = iradon(Radon_ofX,f,’Ram-Lak’); % 66x66
% Display the images
figure; colormap(gray);
396 CHAPTER 7: Methods of Averaging
Example 7.2 Consider the image f(x, y) on the square [0, 1] × [0, 1], which
is composed of eight circles and two ellipses,
10 10 (x − xk )2 (y − yk )2
X X Ik ; if + ≤ rk2
f(x, y) = fk (x, y) = a2k b2k
k=1 k=1 0; otherwise
The spatial data for these circles and ellipses, as well as the intensities, are
given below.
k 1 2 3 4 5 6 7 8 9 10
xk 24 48 88 80 64 20 112 48 24 116
yk 40 52 60 24 92 104 112 16 76 24
ak 1 1 1 5 5 1 1 1 1 1
bk 1 1 1 4 8 1 1 1 1 1
rk 12 20 28 4 4 8 4 4 4 4
Ik 20 8 12 16 20 20 24 20 24 24
The geometry of these figures is in the integer form, but it will be normal-
ized by factor of 127. The number 127 is prime and the reconstruction of the
image is considered on the lattice 127 × 127. Figure 7.9 shows the sampled
discrete image in part a. The method of backprojection by the tensor scanning
scheme uses 128 projections. The reconstruction of the image is shown in b.
The image reconstructed by the method of BP with 128 projections is shown
in c.
20 20 20
40 40 40
60 60 60
80 80 80
FIGURE 7.9
(a) The image 127 × 127, the reconstruction with 128 projections by the (b)
tensor method and (c) BP method with the cropped Ram-Lak filter.
the tomo image 257 × 257 is calculated when the set of generators is J1 =
{{(1, s); s = 0 : 256}, (0, 1)}. Figure 7.10 shows the reconstruction by another
set of 258 generators in part a, which equals J2 = {{(p, 1); p = 0 : 256}, (1, 0)}.
MSR=0.011716 MSR=0.008598
50 50
100 100
150 150
200 200
250 250
50 100 150 200 250 50 100 150 200 250
(a) 258 projections (b) 513 projections
FIGURE 7.10
The reconstruction of the tomo image 257 × 257 by (a) the set of 384 projec-
tions J2 and (b) the set J3 of 513 projections.
MSR error of the reconstruction is 0.011716. One can also consider the sym-
metric scheme of scanning, when the set of generators is combined by these
two sets, namely when
The reconstruction of the image by 513 projections with this set is shown in
part b. MSR error of this reconstruction is 0.008598.
Here, q(n, m) is the sum of all components of the line-integrals in the inter-
section with the square [n, m].
If we propose the value of the reconstructed image at each point (n, m) in
the Cartesian lattice by collecting all rays passing through the square [n, m]
and averaging their contribution, then this value will be calculated by
c(n,m,i,j)
X X (i,j)
¯ m) =< q(n, m) >=
f(n, < wt >.
[i,j]∈S, P (n,m,i,j)6=∅ t=1
study of such models will allows us to approach the next steps of processing, to
achieve a better approximation of the reconstruction. What is important to us
is to keep the scanning schemes proposed in the tensor and paired transform-
based methods of image reconstruction. In such scanning schemes, there is
no coefficients in the geometry w = ξ[i1 ,j1 ] + ξ[i2 ,j2 ] + · · · + ξ[im ,jm ] , because
the length of intersection of the G-rays with any image element is the same.
This is the main principle of scanning in our algorithms, which is valid for all
projections.
We now consider the example of the nonuniform image and the lattice 2×2
on it. Let f(x, y) be the following image:
1 2
a(x, y) b(x, y) 3 4
f(x, y) = = . (7.5)
c(x, y) d(x, y) 5 6
7 8
This image has two different values on each square, as shown in Figure 7.11.
For instance, in the first image element, or square [0, 0], the image has two
values of c(x, y), 5 and 7. The image has value 5 on the area which is two
times smaller than the area with intensity 7. For simplicity of calculation, this
image is considered on the square [0, 2] × [0, 2].
Our goal is to obtain a reconstruction, which is a discrete image fn,m of
size 2 × 2. If the lattice 2 × 6 or 4 × 6 is considered on the image, then the
reconstruction of the image as the discrete image of size 2 × 6 or 4 × 6 is exact.
We here stand on the case 2 × 2. What 2 × 2-point discrete representation
for this image should be considered as the discrete analog or reconstruction
of the image? Can we consider it as one of the following images
12 34 23 4 6
, , , and ?
56 78 67 12 14
It is difficult to select one of these or other images, without describing the
mathematical model of image reconstruction and its solution.
w(0) w(1)
2 2
1 2 1 2
w(0)
3 4 3 4
1 1
5 6 5 6
w(1)
7 8 7 8
0 0
3 4 w(2) w(0) 3 4
1 1
5 6 5 6
7 8 7 8
0 0
FIGURE 7.11
The lattice 2 × 2 on the image and four projections.
For the image f(x, y) given above, these integrals are calculated as follows:
w1,0 (0) = 3 + 4 = 7 w0,1 (0) = (1 + 3) + (5 + 7) = 16
w1,0 (1) = 7 + 8 = 15 w0,1 (1) = (2 + 4) + (6 + 8) = 20
2·3+1 7 2·7+5 19
w−1,1 (0) = = w1,1 (0) = =
3 3 3 3
(2 · 7 + 5) + (2 · 4 + 2) 29 (2 · 3 + 1) + (2 · 8 + 6) 29
w−1,1 (1) = = w1,1 (1) = =
3 3 3 3
2·8+6 22 2·4+2 10
w−1,1 (2) = = w1,1 (2) = =
3 3 3 3
of rays passing through the certain image element are added. The values of
a, b, c, and d are estimated as follows:
w1,0 (0) + w0,1 (0) + w−1,1 (0) + w1,1 (1) b 1 + c2 + d 4
â = = ā + ,
4 4
w1,0(0) + w0,1 (1) + w−1,1(1) + w1,1 (2) a 1 + d 2 + c3
b̂ = = b̄ + ,
4 4
w1,0 (1) + w0,1 (0) + w−1,1 (1) + w1,1 (0) d 1 + a2 + b 3
ĉ = = c̄ + ,
4 4
w1,0 (1) + w0,1 (1) + w−1,1(2) + w1,1 (1) c1 + b 2 + a 4
dˆ = = d¯ + .
4 4
For the image given above, the estimated values differ from their means as
follows: â − ā = 5.83, b̂ − b̄ = 5.83, ĉ − c̄ = 3.83, and dˆ − d¯ = 3.83. We can
conduct the evaluation of this method with respect to the exact model for
image f = [a, b; c, d]. The estimations of image values can be written as
b+c+d 3 a+b+c+d 3 e
â = ā + = ā + = (ā + ) ,
4 4 4 4 3
a+d+c 3 e
b̂ = b̄ + = (b̄ + ) ,
4 4 3
d+a+b 3 e
ĉ = c̄ + = (c̄ + ) ,
4 4 3
c+b+a 3 ¯ e
dˆ = d¯ + = (d + ) ,
4 4 3
where e = a + b + c + d. The error of estimation is thus defined as e/3.
Another algorithm with the following estimations can also be considered:
1
+ 21 w0,1 (0) + w−1,1 (0) + 12 w1,1 (1)
2 w1,0 (0)
â = ,
4
1 1 1
w1,0 (0) + 2 w0,1 (1) + 2 w−1,1 (1) + w1,1 (2)
b̂ = 2 ,
4
1
w1,0 (1) + 12 w0,1 (0) + 12 w−1,1 (1) + w1,1 (0)
ĉ = 2 ,
4
1
w1,0(1) + 12 w0,1(1) + w−1,1 (2) + 12 w1,1 (1)
dˆ = 2 .
4
For the exact model, these equations can be written as
1
2
+ b) + 12 (a + c) + a + 12 (a + d)
(a 1 e 1 e
â = = a + = (a + ) ,
4 2 8 2 4
1 1 1
(a + b) + (b + d) + (c + b) + b 1 e 1 e
b̂ = 2 2 2
= b + = (b + ) ,
4 2 8 2 4
1 1 1
(c + d) + 2 (c + a) + 2 (c + b) + c 1 e 1 e
ĉ = 2 = c + = (c + ) ,
4 2 8 2 4
1
(c + d) + 12 (b + d) + d + 12 (a + d) 1 e 1 e
dˆ = 2 = d + = (d + ) .
4 2 8 2 4
402 CHAPTER 7: Methods of Averaging
The error of estimation for this method is defined as e/4, which is less than
e/3 in the first method. This example shows that the first averaging method
results in a big error, in comparison with the second method. It also gave
us the idea of using probability characteristics of the image along each ray,
and defining a recursive method of image reconstruction. For that, we need
to know only which image elements are intersected by each G-ray.
In the method described above, we use the information of the proportio-
nality of the areas of rectangles into which the square [0, 2] × [0, 2] is divided.
In other words, we use the proportional approach of distribution of random
variables in the line-integrals. We therefore can call this method the method
of proportion. In general, such information is unknown.
% ==================================================
% run_iterations.m M.M. Grigoryan, 11/17/2012
x=[1 2
3 4];
N=4;
y=mit_2by2Model2(N)
% 0.8873 2.0452
% 2.9937 3.9738
e1=norm(x-y);
% N = 1 2 3 4 10
% e1= 0.9045 0.3723 0.1326 0.1215 0.2198
% --------------------------------------------------
function y=mit_2by2Model2(N)
% image is x=[1 2; 3 4];
w101=3; w102=7;
w011=4; w012=6;
w1m11=1; w1m12=5; w1m13=4;
w111=3; w112=5; w113=2;
% initial values of states:
ap=1; bp=1; cp=1; dp=1;
for i1=1:N
Pab_a=ap/(ap+bp); Pab_b=1-Pab_a;
Pac_a=ap/(ap+cp); Pac_c=1-Pac_a;
Pad_a=ap/(ap+dp); Pad_d=1-Pad_a;
Pbc_b=bp/(bp+cp); Pbc_c=1-Pbc_b;
Pbd_b=bp/(bp+dp); Pbd_d=1-Pbd_b;
Pcd_c=cp/(cp+dp); Pcd_d=1-Pcd_c;
ap=(Pab_a*w101+Pac_a*w011+w1m11+Pad_a*w111)/4/2;
bp=(Pab_b*w101+Pbd_b*w012+Pbc_b*w1m12+w113)/4/2;
cp=(Pcd_c*w102+Pac_c*w011+Pbc_c*w1m12+w111)/4/2;
dp=(Pcd_d*w102+Pbd_d*w012+w1m13+Pad_d*w112)/4/2;
y=[ap, bp; cp, dp];
end
y=2*y;
% ==================================================
0.8
f(10)=[0.7883 2.0486
0.6 3.0425 4.0388]
0.4
0.2
0
0 5 10 15 20 25 30
FIGURE 7.12
Errors of reconstruction of the image.
This image and rays of four projections are shown in Figure 7.13.
w(0)=15 w(1)=18
2 2
0 0 0 0
w(0)=7
3 4 3 4
1 1
5 6 5 6
w(1)=15
7 8 7 8
0 0
3 4 w(2)=22/3 w(0) 3 4
1 1
5 6 5 6
7 8 7 8
0 0
w(0)=19/3
0 0.5 1 1.5 2 0 0.5 1 1.5 2
(−1,1)−projection (1,1)−projection
FIGURE 7.13
The lattice 2 × 2 on the image and four projections.
2 8/3 2 2.67
f¯ = = .
19/3 22/3 6.33 7.33
% ==================================================
% run_iterations3.m A.-M. Grigoryan, 01/11/2012
N=3;
y3=mit_2by2Model3(N)
% 2.9209 4.1578
% 7.2468 8.3708
% the block-mean image
xm =[2 8/3
19/3 22/3];
d1=norm(xm-y3) % 2.2247
% ------------------------------------
function y=mit_2by2Model3(N)
% integrals wps(t) for 4 projections
w101=7; w102=15;
w011=15; w012=18;
w1m11=2; w1m12=9; w1m13=22/3;
w111=19/3; w112=28/3; w113=8/3;
...
% ==================================================
3.2
3
f(3)=[2.9209 4.1578 f(10)=[2.4215 3.8745
2.8 7.2468 8.3708] 7.6722 8.7858]
2.6
2.4
2.2
0 5 10 15 20 25 30
FIGURE 7.14
The distance of the approximation to the block-mean image.
Image Processing 407
L =(a + b − y0 )2 + (c + d − y1 )2 + (a + c − y2 )2 + (b + d − y3 )2 + (c − y4 )2
+(a + d − y5 )2 + (b − y6 )2 + (a − y7 )2 + (c + b − y8 )2 + (d − y9 )2 .
(a + b − y0 ) + (a + c − y2 ) + (a + d − y5 ) + (a − y7 ) = 0,
(a + b − y0 ) + (b + d − y3 ) + (b − y6 ) + (c + b − y8 ) = 0,
(c + d − y1 ) + (a + c − y2 ) + (c − y4 ) + (c + b − y8 ) = 0,
(c + d − y1 ) + (b + d − y3 ) + (a + d − y5 ) + (d − y9 ) = 0.
These equations can be written in a new form and new variables Ωx, which
we introduce for x = a, b, c, d, as follows:
(a + b) + (a + c) + (a + d) + a=Ωa = y0 + y2 + y5 + y7 ,
(a + b) + (b + d) + b + (c + b) =Ωb = y0 + y3 + y6 + y8 ,
(c + d) + (a + c) + c + (c + b) =Ωc = y1 + y2 + y4 + y8 ,
(c + d) + (b + d) + (a + d) + d =Ωd = y1 + y3 + y5 + y9 .
d −1 −1 −1 6 Ωd
408 CHAPTER 7: Methods of Averaging
We now change the values of all ten integrals, yk , for the image f = [1, 2; 3, 4],
as shown below in the script mse 2by2Model2.m.
a + b + c + 4d 1114 d
where the pairs (nk , mk ) define the image elements (IEs) trough which the
G-ray passes. We denote by I(p, s) the set of these IEs, and by card its cardi-
nality. It is the discrete length of the G-ray. ∆lk are the lengths of intersections
of the ray with the corresponding k-th IEs in the set I(p, s).
On the first stage of the algorithm, the line-integral wp,s (t) along the G-ray
is distributed between image elements [nk , mk ] of the set I(p, s) in proportion
to the lengths ∆lk ,
(n ,mk )
k ∆lk
wp,s,t (nk , mk ) = wp,s,t = wp,s (t) P . (7.14)
∆li
Here, the summation of ∆li is by all image elements of the set I(p, s). The
intersection of the G-ray with each image element has the same length. There-
fore, the above equation can be written as
wp,s (t)
wp,s,t (nk , mk ) = , k = 1 : card lp,s (t). (7.15)
card lp,s (t)
Here c(n, m) is the number of G-rays lp,s (t) passing through the image ele-
ment, or square [n, m]. The summation of wp,s,t (n, m) is by all triplets (p, s, t)
defining such G-rays. In the considered tensor scheme of scanning the image
by G-rays, the matrix ||c(n, m)|| is known, and there is no need to calculate
these coefficients. All coefficients c(n, m) are equal in this matrix.
To demonstrate the result of approximation of the image, an,m, on this
first stage, we consider the following example when N = 64. The gray-scale
412 CHAPTER 7: Methods of Averaging
TABLE 7.2
Integer data of rectangles
k x0k yk0 ∆x0k ∆yk0 Rk
1 10 15 10 15 1
2 12 40 18 10 2
3 40 40 10 20 1
4 45 10 5 20 3
10
0.8 3
2 20
0.6
30
0.4 40
1
4
50
0.2
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
(a) (b)
FIGURE 7.15
(a) Image with 4 rectangles on the square 64 × 64 and (b) the first iteration.
image on the square [0, 1] × [0, 1] is composed of four rectangles with the data
given in Table 7.2. The data is normalized with respect to the lattice 64 × 64.
Figure 7.15 shows these four rectangles in part a. The result of the calculation
of the image an,m after the first iteration is shown in part b. The appearance
of each rectangle is spread in two major directions, vertical and horizontal.
On the first stage of the algorithm, which we also call the zero stage, we
receive the image which is considered to be a rough estimation of the original
image; it gives us some information about the probability of the image.
We now consider the next stage of the reconstruction. The line-integrals
are considered along the new image an,m . The values of the new image on
the squares [nk , mk ], through which the ray lp,s (t) passes, will be denoted
by s1p,s,t (nk , mk ). Along this ray, the probability density function at point
(nk , mk ), which is referred to as the square [nk , mk ], is calculated by
(1)
(1) sp,s,t (nk , mk )
pp,s,t (nk , mk ) = X (1) , k, (i) = 1 : card lp,s (t). (7.17)
sp,s,t (ni , mi )
i
This process will be repeated a few times, and the probability density
functions will be recalculated on each new image, until the given number of
iterations is accomplished. At each new stage of the iteration, the obtained
(n)
image an,m , n ≥ 1, is used to get probability information for the next image,
by calculating the probability density function by
(n+1)
(n+1) sp,s,t (nk , mk )
pp,s,t (nk , mk ) = X (n+1) , k, (i) = 1 : card lp,s (t). (7.20)
sp,s,t (ni , mi )
i
Here, sn+1 denotes the values of the new image on the squares [nk , mk ]
p,s,t (nk , mk )
through which the ray lp,s (t) passes. The image at this stage is calculated by
1 X (n+1)
a(n+1)
n,m = wp,s,t (n, m), n, m = 0 : (N − 1), (7.21)
c(n, m)
(p,s,t)
and the distribution of the line-integral among the image elements [nk , mk ] is
defined as
(n+1) (n+1)
wp,s,t (nk , mk ) = wp,s (t)pp,s,t (nk , mk ), k = 1 : card lp,s (t). (7.22)
As an example, we consider the same image 64 × 64 with four rectangles.
Figure 7.16 illustrates the process of reconstruction of this image on diffe-
rent stages of the calculation. In parts a, b, c, and d, the results of image
reconstruction after 5, 10, 20, and 50 iterations are shown, respectively.
The described process of iterations converges and results in a good-quality
reconstruction. Figure 7.17 shows the curve of differences between the approx-
imations after k and k − 1 iterations, where k = 2 : 100,
v
uN−1 N−1
(k) (k−1) 1 u X X (k) (k−1)
εk = ε(a , a ) = 2t [an,m − an,m ]2 , (N = 64).
N n=0 n=0
5 iterations 10 iterations
10 10
20 20
30 30
40 40
50 50
60 60
20 40 60 20 40 60
(a) (b)
20 iterations 50 iterations
10 10
20 20
30 30
40 40
50 50
60 60
20 40 60 20 40 60
(c) (d)
FIGURE 7.16
Reconstruction of the image with 5, 10, 20, and 50 iterations.
−3
x 10
2
1.5
0.5
0
0 10 20 30 40 50 60 70 80 90 100
FIGURE 7.17
Difference between the first 100 iterations.
R#3
10 10
R#1
20 20
30 30
R#2
40 40 R#4
50 50
60 60
10 20 30 40 50 60 10 20 30 40 50 60
(a) (b)
FIGURE 7.18
Reconstruction of the image with (a) 100 and (b) 200 iterations.
rectangles with data given in Table 7.2. The number of iterations is 200. This
program uses the same functions tensor scheme pst, general scheme pst2, and
fieldpst tensor scheme, which are described in Section 6.3 in the program
reconstruction byR.m.
% -------------------------------------------------------
% call: mreconstruction_bypm1.m / A.-M. Grigoryan, 2011
N=64;
M=3*N*N/8+2; M1=1/N;
delta=1/N;
N_rect=4;
MNrects=[10 15 20 30
12 40 30 50
40 40 50 60
45 10 50 30];
Matr_rect=delta*MNrects;
E=[1 2 1 3]; % intensities of 4 rectangles
% Plot the grid NxN
figure; colormap(gray);
subplot(1,2,1);
draw_grid; axis image; pause(1);
% ===================== Processing ========================
ps=ps_generators(N); L=size(ps,1);
eps100=eps*100;
N_iterations=200; % number of iteration
subplot(1,2,2);
for iter=1:N_iterations % loop for iterations
Y=zeros(N,N);
for k=1:L % loop for (p,s)-projections
p=ps(k,1); s=ps(k,2);
%----------------------------------
[p1,s1,t]=tensor_scheme_pst(p,s,N);
416 CHAPTER 7: Methods of Averaging
%----------------------------------
Length_t=length(t);
for it=1:Length_t % loop for (p,s,it) G-rays
sum_E=fieldpst_tensor_scheme(p1,s1,t(it), ...
N,N_rect,Matr_rect,E);
if (sum_E>eps)
f=general_scheme_pst2(p1,s1,t(it),N);
f_sz2=size(f,2);
L0=0;
for nf=1:f_sz2
L0=L0+f(3,nf);
end
if iter==1
for nf=1:f_sz2
m1=f(1,nf); n1=f(2,nf);
Y(m1,n1)=Y(m1,n1)+sum_E/L0;
end
else
% ========= STATISTICS =============
% Integrate for statistical rays
S_po=0;
for nf=1:f_sz2
m1=f(1,nf); n1=f(2,nf);
S_po=S_po+R(m1,n1);
end
if (S_po>eps100)
% Calculate statistical rays
for nf=1:f_sz2
m1=f(1,nf); n1=f(2,nf);
Y(m1,n1)=Y(m1,n1)+ss*R(m1,n1);
end
end
% ===================================
end
end
end % for loop: (p,s,t)-rays
end % for loop: (p,s)-projections
R=Y/M ;
% display the normalized reconstruction on this stage
subplot(1,2,2);
if iter==1
XR=R;
else
XR=R/M1;
end
imagesc(XR); axis image;
title(sprintf(’ %g Iterations’,iter)); pause(0.1);
end % for loop: iterations
% --------------------------------------------------------
Image Processing 417
TABLE 7.3
Integer data of rectangles
k x0k yk0 ∆x0k ∆yk0 Rk
1 10 15 10 15 + 0.25 1
2 12 + 0.1 40 18 10 2
3 40 40 + 0.2 10 20 1
4 45 10 5 + 0.5 20 3
Figure 7.19 shows four shifted rectangles on the square [0, 1] × [0, 1] in part
a, along with the results of image reconstruction after 10 iterations in part b.
10
0.8 3
2 20
0.6
30
0.4 40
1
4
50
0.2
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
(a) (b)
FIGURE 7.19
(a) Image with 4 rectangles and (b) image approximation after 10 iterations.
Figure 7.20 shows the results of image reconstruction after 50 and 100
iterations in parts a and b, respectively.
418 CHAPTER 7: Methods of Averaging
10 10
20 20
30 30
40 40
50 50
60 60
10 20 30 40 50 60 10 20 30 40 50 60
(a) (b)
FIGURE 7.20
Reconstruction of the image after (a) 50 and (b) 100 iterations.
Problems
Problem 7.1 (Discrete Model) Consider the following two images on the
square [0, 1] × [0, 1] :
8
< 2; if x ∈ [0.6875, 0.8125], y ∈ [0.750, 0.875],
f1 (x, y) = 3; if x ∈ [0.1875, 0.3125], y ∈ [0.125, 0.250],
0; otherwise,
:
(x − 0.5)2 (y − 0.5)2
8
1
1; if + ≤ ,
<
f2 (x, y) = a2 b2 4
0; otherwise.
:
where a = 0.25 and b = 0.5. Figure 7.21 shows rectangles and the ellipse to-
gether in part a, along with the discrete representation of the image composed
of these figures in b. The discrete image is of size 61 × 61, and 61 is prime.
Therefore, only 62 projections are required for the reconstruction of the image
in b.
A. Use the tensor method of summation by (7.4) and calculate the recon-
struction of the image f1 (x, y) on the Cartesian lattice 61 × 61.
B. Repeat A for the image f2 (x, y), as well as for the sum of images
f(x, y) = f1 (x, y) + f2 (x, y).
Display the results and calculate errors of reconstruction in A, B, and C.
10
0.8 1
20
0.6
3 30
0.4
40
0.2 2 50
0 60
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
(a) (b)
FIGURE 7.21
(a) Rectangles and ellipse on [0, 1] × [0, 1] and (b) the discrete image 61 × 61.
A. Use the tensor method of summation by (7.4) and calculate the recon-
struction of this image on the Cartesian lattices 128 × 128 and 256 × 256.
Calculate all required line-sums pϑ (np + ms) through the line-integrals, by
transferring the geometry of G-rays to A-rays. Display the results and calcu-
late the MRS error of reconstruction in both cases.
B. Find a way to improve the results of the image reconstruction by re-
moving the shadows created by these rectangles. Show your results.
Problem 7.3 Consider the image on the square [0, 1] × [0, 1], which is com-
posed of the sum of seven circles with the following coordinates (xk , yk ), radii
rk , and intensities Ik :
k 1 2 3 4 5 6 7
xk 6 12 22 20 16 5 28
yk 10 13 15 6 23 26 28
rk 3 5 7 4 7 2 1
Ik 5 2 3 4 5 5 6
The data of coordinates and radii are given in integer form, and should be
normalized by the factor of N, when reconstructing on the lattice N × N.
A. Use the tensor method of summation and calculate the reconstruction
of this image on the Cartesian lattices 128 × 128 and 256 × 256. Display the
results and calculate the MRS error of reconstruction in each case.
B. Remove the vertical and horizontal projections in the tensor scheme of
scanning and reconstruct the image on the lattices 128 × 128 and 256 × 256.
C. Compare MRS errors of reconstruction in A and B. If errors of recon-
struction in B are smaller than in A, explain this fact.
420 CHAPTER 7: Methods of Averaging
Each square is referred to as an image element of size 1/8 × 1/8. Use the
method with statistics and calculate the 8 × 8 reconstruction of this image
after 1, 2, 20, and 30 iterations. Show the result and calculate the MSR error
of reconstruction for each of these iterations.
Problem 7.5 (Probability Model) Consider the following image on the
square [0, 1] × [0, 1] :
1 0 0 0 0 0 1
0 0 0 1 0 0 0
0 0 0 1 0 0 0
[f(x, y); 0 ≤ x, y ≤ 1 ] = 0 1 1 7 1 1 0 .
0 0 0 1 0 0 0
0 0 0 1 0 0 0
1 0 0 0 0 0 1
Each square is referred to as an image element of size 1/7 × 1/7. Use the
method with statistics and calculate the 7 × 7 reconstruction of this image
after 10, 20, and 30 iterations. Show the result and calculate the MRS error
of reconstruction for each of these iterations.
Problem 7.6 (Probability Model) Consider the following image on the
square [0, 1] × [0, 1]:
0 0 2 2 0 2 0 0
1 1 0 0 4 6 4 0
1 1 2 0 0 2 0 1
0 0 2 0 0 2 0 1
[f(x, y); 0 ≤ x, y ≤ 1 ] = .
2 0 2 0 0 2 0 0
0 4 0 1 1 0 0 0
3 3 3 0 0 2 2 2
0 0 0 2 2 0 0 0
Problem 7.8 Consider the image on the square [0, 1] × [0, 1], which is com-
posed of the sum of seven rectangles with the following coordinates [xk,1, yk,1,
xk,2 , yk,2] and intensities Ik :
k 1 2 3 4 5 6 7
xk,1 10 12 40 45 29 20 30
yk,2 15 40 40 10 29 7 2
xk,1 20 30 50 50 35 40 33
yk,2 30 50 60 30 35 10 16
Ik 1 2 1 3 2 1 1
The data of coordinates are given in integer form, and should be normalized
by the factor of 64.
A. Use the method with statistics and the set of 96 generators (p, s)
J 1 = {(1, s), s = 0 : 63} ∪ {(2p, 1), p = 0 : 31}, and calculate the 64 × 64
approximation of this image after 10, 50, and 100 iterations.
B. Repeat A for the following set of 127 generators: J 3 = {(1, s), s = 0 :
63} ∪ {(p, 1), p = 0, 2 : 63}.
C. Show the results in A and B, calculate the MSR errors of the obtained
approximations, and compare the results.
Problem 7.9 Consider the image composed from the ten circles and ellipses,
10 (x − xk )2 (y − yk )2
X Ik ; if + ≤ rk2
f(x, y) = a2k b2k
k=1 0; otherwise
whose data (in integer form) and intensities Ik are the following:
k 1 2 3 4 5 6 7 8 9 10
xk 24 48 88 80 64 20 112 48 24 116
yk 40 52 60 24 92 104 112 16 76 24
ak 1 1 1 5 5 1 1 1 1 1
bk 1 1 1 4 8 1 1 1 1 1
rk 12 20 28 4 4 8 4 4 4 4
Ik 20 8 12 16 20 20 24 20 24 24
The data of coordinates are given in integer form, and should be normalized
422 CHAPTER 7: Methods of Averaging
by the factor of N = 128. Use the method with statistics and the set of 3N/2
generators (p, s) J 1 = {(1, s), s = 0 : N − 1} ∪ {(2p, 1), p = 0 : N/2 − 1}, and
calculate the N × N approximation of this image after 50 and 100 iterations.
Show the results and calculate the MRS errors of the obtained approximations.
[1] J.W. Cooley and J.W. Tukey, “An algorithm the machine computation of
complex Fourier series,” Math. Comput, vol. 9, no. 2, pp. 297-301, 1965.
[2] D.F. Elliot and K.R. Rao, Fast Transforms: Algorithms, Analyzes, and Appli-
cations, New York, Academic, 1982.
[3] L. Rabiner and R.W. Schaefer, Speech Signal Processing, Prentice Hall, Engle-
wood Cliffs, New Jersey, 1983.
[4] R.E. Blahut, Fast Algorithms for Digital Signal Processing, Addison-Wesley,
Reading, Massachusetts, 1985.
[5] P. Duhamel and M. Vetterli, “Fast Fourier transforms: A tutorial review and
state of the art,” Signal Processing, vol. 19, pp. 259-299, 1990.
[6] Handbook for Digital Signal Processing, edited by J.F. Kaiser and S.K. Mitra,
Wiley-Interscience, New York, 1993.
[7] W.K. Pratt Digital Image Processing, Wiley-Interscience, New York, 1978.
[8] A. Rosenfeld and C. Kak, Digital Image Processing, vols. I and II. Academic
Press, New York, 1982.
[9] Anil K. Jain, Fundamentals of Digital Image Processing, Prentice Hall, New
Jersey, 1989.
[10] R.C. Gonzalez and R.E. Woods, Digital Image Processing, 2nd edition, Prentice
Hall, New-Jersey, 2002.
[11] R.V. L. Hartley, A more symmetrical Fourier analysis applied to transmission
problems,” Proc. IRE, 30, pp. 144-150, March 1942.
[12] R.N. Bracewell, The Hartley Transform, Oxford University Press, 1986.
[13] R.N. Bracewell, O. Buneman, H. Hao, and J. Villasenor, “Fast two-dimensional
Hartley transform,” Proc. IEEE, 1986, 74, pp. 1282-1283.
[14] J.L. Wu and Pei Soo-Chang, “The vector split-radix algorithm for 2-D FHT,”
IEEE Transactions on Signal Processing, 1993, vol. 41, no. 2, pp. 960-965.
[15] G. Bi, “New split-radix algorithm for the discrete Hartley transform,” IEEE
Transactions on Signal Processing, February 1997, vol. 45, no. 2, pp. 297-302.
[16] N. Ahmed and R. Rao, Orthogonal Transforms for Digital Signal Processing,
Springer-Verlag, Berlin, 1975.
[17] K.R. Rao and P. Yip, Discrete Cosine Transform—Algorithms, Advantages,
Applications, Academic Press, Boston, 1990.
[18] W.B. Pennebaker and J.L. Mitchell, JPEG Still Image Compression Standard,
Van Nostrand Reinhold, New York, 1993.
423
424 Image Processing
[51] A.M. Grigoryan and M.M. Grigoryan, Brief Notes in Advanced DSP: Fourier
Analysis with MATLAB, CRC Press, Taylor and Francis Group, Boca Raton,
Florida, 2009.
[52] A.M. Grigoryan and K. Naghdali, “On a method of paired representation:
Enhancement and decomposition by series direction images,” Journal of Ma-
thematical Imaging and Vision, vol. 34, no. 2, pp. 185-199, June 2009.
[53] A.M. Grigoryan and Nan Du, “2-D images in frequency-time representation:
Direction images and resolution map,” Journal of Electronic Imaging, vol. 19,
no. 3, (033012) pp. 1-14, July-September 2010.
[54] Nan Du and A.M. Grigoryan, “Paired transform method of image reconstruc-
tion from projections,” in Object Modeling, Algorithms and Applications, edited
by R.P. Barneva, V. Brimkov, et al., Research Publishing, June 18, 2010.
[55] A.M. Grigoryan, Multidimensional Discrete Unitary Transforms, book-chapter
19 (69 pages) in Transforms and Applications Handbook, 3rd ed., in the Electri-
cal Engineering Handbook series (Editor in Chief, Prof. Alexander Poularikas)
CRC Press, Taylor and Francis Group, Boca Raton, Florida, 2010.
[56] A.M. Grigoryan and Nan Du, “Principle of superposition by direction images,”
IEEE Trans. on Image Processing, vol. 20, no. 9, pp. 2531-2541, Sept. 2011.
[57] A.M. Grigoryan, “Comments on ‘The discrete periodic Radon transform,’”
IEEE Trans. on Signal Processing, vol. 58, no. 11, pp. 5962-5963, Nov 2010.
[58] T. Hsung, D.P.K. Lun, and W. Siu, “Reply to ‘Comments on The Discrete
Periodic Radon Transform,’” IEEE Trans. on Signal Processing, vol. 58, no. 11,
pp. 5963-5964, Nov 2010.
[59] A.M. Grigoryan and Nan Du, “Comments on ‘Generalised finite Radon trans-
form for N × N images,’” Image and Vision Computing, vol. 29, pp. 797-801,
November 2011.
Grigoryan 427
Appendix A
GRIGORYAN A. M.
Consider an arbitrary array {fn,k } of the discrete signal, whose size for simplicity
of exposition will be considered equal, i.e., n, k = 1 : N, for an integer number N.
At each point (p, s) of the spectrum, the Fourier transform of the signal up to
the normalized factor equals
N X
X N
Fp,s = fn,k W np+ks , (A.1)
n=1 k=1
where W = WN = exp(2πi/N ).
For arbitrary p, s, t = 1 : N, define the sets
and let X
fp,s,t = fn,k . (A.3)
Vp,s,t
Then, due to (A.2) and (A.3), at arbitrary point (p, s) of the spectrum we obtain
N
X
Fp,s = fp,s,t W t . (A.4)
t=1
Indeed, due to definitions (A.2) and (A.3), as well the property of periodicity of
the discrete Fourier transform, we have
0 1
XN XN X XN X N
tk
fp,s,t W = @ fn,m A W tk = fn,m W (np+ms)k = Fkp,ks = Fkp,ks ,
t=1 t=1 Vp,s,t n=1 m=1
1 Vol. 27, no. 10, Izv. vuzov MV and SSO SSSR. Radioelectronica, 1984. UDK 517.443
428 Appendix A. Algorithm of the DFT
because, for arbitrary p, s, the sets Vp,s,t divide the domain of definition of the
[N
spectrum XN = {(n, m); n, m = 1 : N } in such a way, that XN = Vp,s,t and
t=1
Vp,s,t1 ∩ Vp,s,t2 = ∅ when t1 6= t2 .
Formula (A.5) means for fixed values of (p, s), from components fp,s,1 , . . . , fp,s,N
of the tensor, by means of the Fourier transform, one can obtain the spectrum at
N
points (kp, ks) which compose the cyclic group Tp,s with the generator (p, s), i.e.,
N
Tp,s = {(kp, ks); k = 1 : N }. (A.6)
For instance, for (p, s) = (1, 1), from components of the tensor f1,1,t , we obtain
the values of the spectrum of the signal at samples (1, 1), (2, 2), . . . , (N, N ).
As an example, let N be a power of two, then, by performing the fast Fourier
transform (FFT) over the sequence fp,s,1 , fp,s,2 , . . . , fp,s,N , we define due to (A.5)
N
the values of the spectrum in the group Tp,s , by performing about 0.5N log2 N (the
exact number 0.5N (log2 N − 2) + 1)2 operations of complex multiplications by non-
trivial rotation factors (powers of the exponent W ), i.e., an average for each sample
of the spectrum
N
vp,s = 0.5N log2 N/card Tp,s (A.7)
operations of multiplication; card means the cardinality (order) of the group.
N
If p, s and N do not have common dividers, then card Tp,s = N, therefore in
each point of form (kp, ks), for such p, s, the spectrum of the two-dimensional signal
is calculated by means of 0.5 log2 N operations of complex multiplication, i.e., the
same number as is necessary in the case of the one-dimensional Fourier transform.
It should be noted, that the existing algorithms of the two-dimensional FFT require
1.5 − 2 times more similar operations [1,2].
For N prime, the similar assertion is valid and the corresponding estimate vp,s
can be considered equal to (A.7), where N in the numerator of the formula is sub-
stituted by the nearest number equal to the power of two. Indeed, for such N,
the algorithm of FFT does not exist and, therefore, as done often in most practi-
cal problems, the artificial lengthening of the processed sequence is performed by
adding zeros to the minimum size which is equal to the power of two. Let us show
how to use formula (A.5) for effective, in the sense of high speed, calculation of the
complete spectrum of the two-dimensional signal.
It is obvious, that to do this it is necessary to select the values (p, s) of the samples
N
in an optimal way, such that the corresponding groups Tp,s cover the domain XN
with a minimum number of intersections. Indeed, for N equal to powers of 2, one
can show that there is no such covering of the spectral domain
[ N
XN = Tp,s , (A.8)
J
2 It should be 0.5N (log2 N − 3) + 2, as in the paired FFT. A.M. Grigoryan, Dec. 2010
Grigoryan 429
For prime N such covering of the domain of the spectrum exists; for instance,
as such a set one can take
Jp = {(1, p), p = 1 : N } ∪ (N, 1)
or (A.10)
Jp0 = {(p, 1), p = 1 : N } ∪ (1, N ).
Indeed, the following lemma is valid.
L e m m a . If the number N is prime, then for any l 6= N
N
X “ ” • N
X “ ” •
• N N • N N
XN = Tk,l \ (N, N ) +Tl,N = Tl,k \ (N, N ) +TN,l , (A.11)
k=1 k=1
•
where the signs • and + denote the union of disjoint sets.
P
P r o o f. For simplicity, we take l = 1, and let k1 and k2 , k1 6= k2 , be such that
TkN1 ,1 ∩TkN2 ,1 6= (N, N ), i.e. there exists (p0 , s0 ) = n1 (k1 , 1) = n2 (k2 , 1), which however
takes place only with fulfillment of the equalities n1 = n2 and n1 k1 = n2 k2 ( mod N ),
from which it follows that n1 (k1 −k2 ) = 0( mod N ). And, because by the assumption,
n1 6= N and N is prime, the last equality when k1 6= k2 could not be fulfilled.
Similarly, one can prove that for any k ∈ [1, N ], we have TkN1 ,1 ∩ T1,N N
= (N, N ).
N N
Then, because all sets Tk,1 \ (N, N ) and T1,N are contained in XN and together
have the cardinality equal N (N − 1) + N = N 2 = card XN , from here the validity
of the decomposition (A.11) follows. The lemma has been proved.
Thus, the existence of the optimal covering of the domain XN of the spectrum is
proved for N prime. By similar reasoning, it can be proved that for N equal powers
of two, the optimal covering of the domain XN of the spectrum does not exist, in
the sense of (A.8) and (A.9).
Therefore, as indicated above, for N, being a power of 2, in the covering (A.8)
it is necessary to pick up such generators (p, s), whose corresponding cyclic groups
intersect in minimum in the aggregate. One can prove that for such N it is enough
to take, in (A.8), the set equal
Jr = {(l, p), p = 1 − N } ∪ {(2k, l), k = 1 : N/2}
or (A.12)
Jr0 = {(p, l), p = 1 − N } ∪ {(l, 2k), k = 1 : N/2},
is almost twice fewer than in the existent methods of the DFT, and 4/3 times fewer
for N equal the power of two.
At that, if for prime N the estimate of the relation in (A.13) is exact, for N
equals a power of two, the number of complex multiplications can be reduced in the
following way. Consider the groups covering the domain of the spectrum
N N N N N N
Tl,1 , Tl,2 , . . . , Tl,N , T2,l , T4,l , . . . , TN,l , (A.14)
r
when N = 2 , where r is an integer number, and l is any prime. It is not difficult to
show that for all p = 1 : N, the following is valid:
N N k k
Tl,p ∩ Tl,p+N/2k = {(n, m); ∃ k1 , n = 2 k1 l, m = 2 k1 p}, (A.15)
i.e., intersections of these groups is a subgroup which consists of all elements with
coordinates multiple to 2k . Indeed, for arbitrary integer k1 , we have (2k k1 l, 2k k1 p) =
(2k k1 l, 2k k1 (p + N/2k )) and on the contrary, if for some k1 and k2 we have
(k2 l, k2 p) = (k1 l, k1 (p + N/2k )), then the following conditions should be fulfilled:
(k2 − k1 )l = 0(modN ), (k2 − k1 )p = k1 N/2k (modN ), and because L is prime, N is
the power of two, it follows from the first equality that k1 = k2 , and from the second
one that k1 is the number multiple to 2k .
Thus, the equality in (A.15) has been proved. For any k and m = 1 : r, we denote
N,m
by Tl,k the set
“ ”
N,m N N N
Tl,k = Tl,k \ Tl,k ∩ Tl,k+N/2m . (A.16)
N,1
Consider first the sets Tl,k , i.e., the m = 1 case. Due to (A.12) and (A.15), we
obtain
N/2 “ ” N/4
[ N N,1
[ “ N N,1
”
XN = Tl,k ∪ Tl,k+N/2 T2m,l ∪ T2m+N/2,l , (A.17)
k=1 m=1
N,m
and it is obvious that card Tl,k N
= (1 − 1/2m )card Tl,k .
N,1 N
The sets Tl,k , for k = 1 : N, consist of all odd elements of groups Tl,k and have
N,1
cardinality card Tl,k = 0, 5N.
In [3], the algorithms of the FFT with decimation in frequency are described,
which after the first stage of iteration, when the N -point transform is divided by
two N/2-point Fourier transforms, all values of the spectrum with odd and even
coordinates are defined separately. Therefore, using such algorithms of the FFT for
calculating the two-dimensional spectrum by formula (A.5), one can define the values
N,1
of the spectrum at the sets Tl,k , by performing twice fewer operations of complex
N
multiplication than for the corresponding group Tl,k .
Thus, because of the selected covering (A.17), we find that the number of opera-
tions of complex multiplication sufficient for calculating the two-dimensional Fourier
transform by the tensor method is no greater than the number
v0 = N/2(log2 N − 2) + 1. (A.19)
Grigoryan 431
N/4 N/8
[ N,1
[ “ N N,2
”
T2m+N/2,l T2m,l ∪ T2m+N/4,l , (A.20)
m=1 m=1
N,2
in addition, due to (A.15), card Tl,k = 3N/4.
As in the m = 1 case, if the spectrum of the signal was defined in the group
N,1 N,2
Tl,k , then for calculating the spectrum in the set Tl,k , it is enough on the second
stage of iteration in the algorithm of the FFT with decimation by frequency, after
when two N/2-point Fourier transforms are divided by four N/4-point transforms,
to use only the first three N/4-point Fourier transforms. Therefore, to define the
N,2
spectrum in Tl,k , it is enough to perform 4/3 times fewer operations of the complex
N,1
multiplication than for the corresponding Tl,k .
Thus due to (A.20), on the second stage of improvement, when m = 2, the
number of operations of multiplication for calculating the DFT by the tensor method
will not be greater than the number
v0 1 N 2 (3 log2 N − 4) + 1
χ0N = = .
v 4 (N + 1)(N/2(log2 N − 2) + 1)
Hence, we obtain χ0N > 1.6 for large N ; for instance, for values of N equal 128 and
1014, we have χ0128 > 1.68 and χ01024 > 1.62.
432 Appendix A. Algorithm of the DFT
where ṽ0 denotes the number of multiplications required for calculating the N -point
FT, and ω̃0 = ṽ0 /N. As already mentioned, one can consider ṽ0 to be equal to the
estimate in (A.19), for the corresponding nearest to the prime N size equal to a
power of two. According to the Lemma on covering of the spectrum domain, the
estimate in (A.21) cannot be improved, and therefore is the minimum.
In comparison with the existing algorithms of the two-dimensional FFT, the
proposed algorithm is also more effective by the volume of required temporary sto-
rage. Indeed, in the known algorithms of the two-dimensional FFT, it is necessary
to have additional temporary storage for constantly storing the intermediate results
of computing during the entire process of calculation. The volume of such storage
exceeds a few times the volume of the original signal, which essentially reduces the
possibility of using the algorithms of the two-dimensional FFT for the large size of
the signal. In the proposed tensor algorithm, such additional storage is not required,
because the values of the spectrum in each group of samples are calculated right
after defining the corresponding components of the tensor.
Thus, the existing methods of calculation of the two-dimensional Fourier trans-
form yield the tensor method by the main characteristics. In spite of the fact that
the sizes of the two-dimensional signal were assumed equal, one can easily extend
the tensor method of calculation of the spectra in the general case. Moreover, simi-
lar reasoning can be transferred to the case of the n-dimensional Fourier transform,
where n > 2, as well.
References
Appendix B
GRIGORYAN A. M.
(Yerevan)
For that, as follows from (B.1), each component of the vector (B.2) must be
i.e. X
fp1 ,...,pn ,t = fk1 ,...,kn . (B.4)
Vp1 ,...,pn,t
It is obvious that for a fixed value of point (p1 , ..., pn ), the sets (??) for different
n
t = 1, 2, ..., N together cover the whole domain of definition ZN of the original signal
without intersecting, therefore we have
N
X
Fkp1 ,...,kpn = fp1 ,...,pn ,t W kt (B.5)
t=1
for any integer k; here kpi = (kpi ) mod N. It follows from (B.5), that the Fourier
transform over the vector (B.2), which corresponds to the spectral component at
point (p1 , ..., pn ), defines the values of the n-dimensional spectrum at all points of
the group with generator (p1 , ..., pn ) :
Consider the cases when the size of the signal N is an arbitrary prime number or
power of two. It is not difficult to show that for N prime, the totality of groups (B.6),
which corresponds to the points of the set Jp = {(1, 1), (1, 2), ...., (1, N ), (N, 1)},
2
cover the whole domain ZN in optimal way, in the sense that all covering groups in
such totality intersect between themselves only at the point (N, N ). In the case when
N equals a power of two, such optimal covering does not exist. Indeed, one can be
easily convinced that in any totality of groups (B.6) that entirely cover the domain
of definition of the spectrum, there will, without fail, be intersections in the even
points as well. Moreover, each such point belongs to at least two different groups of
that totality, besides each covering totality contains no less than 3N/2 groups (B.6),
because for powers of two N one can fulfill the covering of the domain of definition
Grigoryan 435
Moreover, as follows from (B.5), for an arbitrary odd value of k the following
takes place
N/2
X 0
Fkp1 ,...,kpn = fp1 ,...,pn ,t W kt .
t=1
By opening here the exponential factors for odd values of k = 2m − 1, where m is
any integer, we obtain
N/2
X` ´ mt
Fkp1,...,kpn = −t
fp0 1 ,...,pn ,t WN WN/2 . (B.10)
t=1
where kJN/k = {(kp1 , kp2 ); (p1 , p2 ) ∈ JN/k }, for all k = 2r , r = 0, 1, ..., log2 N,
and JN/k are the above defined sets {(1, p2 ), p2 = 1, 2, ..., N/k} ∪ {(2p1 , 1), p1 =
1, 2, ..., N/(2k)} all powers of two k from 1 to N/2; for k = N we have J1 = {1, 1}. It
is easy to show that in set (B.14) when k1 6= k2 will be JN/k1 ∩ JN/k2 6= ∅, and thus
J 2 satisfies the condition of optimality (B.13) of covering the domain of definition
of the spectrum. Further, the cardinalities of sets (B.12) in (B.13) for such J equal
card Tp0 1 ,p2 = 0.5N/2r , if (p1 , p2 ) ∈ 2r JN/2r , where r = 0, 1, ..., log2 N, and for the
sets in (B.14) we have card JN/2r = 1.5N/2r . Therefore, it follows easily from (B.14),
card J 2 = 3N − 2.
Thus, in the optimal covering (B.13), which unites 3N − 2 sets (B.12), 3N/2
of them contain N/2 elements each, 3N/4 sets contain N/2 elements each, and so
on. Therefore, to define the complete spectrum of the two-dimensional signal of
size N × N, it is enough to fulfill 3N/2 one-dimensional N/2-point DFTs, 3N/4
one-dimensional N/4-point DFTs, and so on.
Indeed, let the arbitrary point (p1 , p2 ) from J 2 belong to the set 2r JN/2r
for some r ∈ [0, log2 N ], i.e., g.c.d.(p1 , p2 ) = 2r . Due to definitions (B.3),(B.4)
and (B.9), it is obvious, that in the corresponding vector G(F )p1 ,p2 , all com-
ponents with numbers not multiple to the number 2r equal zero. There-
fore, one can associate uniquely to such vector the N/2r+1 -dimensional vector
r
G(F )p1 ,p2 = (gp1 ,p2 ,1 , gp1 ,p2 ,2 , ..., gp1 ,p2 ,N/2r+1 ), wherein the components gp1 ,p2 ,t =
0 −t r+1
fp1 ,p2 ,2r t WN/2r for all t = 1 − N/2 . At that, for any values of m, the following
equality is valid
N/2 N/2r+1
X` −t ´ mt
X mt
fp0 1,p2 ,t WN WN/2 = gp1 ,p2 ,t WN/2r+1 . (B.15)
t=1 t=1
Therefore the N/2-point DFT of the vector F̄p0 1 ,p2 , for arbitrary point (p1 , p2 ) ∈
2r JN/2r , where r ∈ {0, 1, ..., log2 N }, is equivalent to fulfillment of the N/2r+1 -point
r
DFT over the corresponding vector G(F )p1 ,p2 . It follows from here, that the results
of 3N − 2 one-dimensional DFTs of order N/2, which are sufficient for calculating
the complete two-dimensional DFT by the proposed algorithm with formula (B.10),
are equivalent in union to the results of fulfillment of the mentioned DFTs: 3N/2 of
order N/2 each, 3N/4 of order N/4 each, and so on.
0
Calculate the volume vN,N of non-trivial operations of multiplication by the
rotated exponential factors, which are necessary for fulfillment of the proposed algo-
rithm of calculation of the (N × N )-point DFT. If we denote by vM (with arbitrary
438 Appendix B. New Algorithms of the DFT
power of two M ) the volume of such operations for the M -point DFT, then it is
obvious, that from (B.10) and (B.15) we obtain
0
vN,N = (3N/2)(vN/2 + N/2 − 2) + (3N/4)(vN/4 + N/4 − 2) + ...
log 2 N −2
X (B.16)
... + 3 · 2(v2 + 2 − 2) = 3N 2−r vN/2r + N 2 − 6N + 8.
r=1
At that their components are calculated easily; for example, for r = 0, 1, we have
0 0
f1,t = ft − ft+N/2 , t = 1, 2, ..., N/2, f2,t = ft + ft+N/2 − ft+3N/4 − ft+N/4 , t =
1, 2, ..., N/4. Consequently, the number of non-trivial operations of multiplication in
this algorithm is calculated by the following recurrent formula for N > 8 :
0 0 0
vN = (vN/2 + N/2 − 2) + (vN/4 + N/4 − 2) + · · · + (v80 + 6) + v80 ;
Grigoryan 439
References
[1] Rabiner L., Gold B. Theory and application of the digital signal processing. M.:
Mir, 1978.
[2] Yaroslavsky L. P. Introduction to digital image processing. M.: Sov. radio, 1979.
[3] Nussbaumer, H. J. Calculation of two-dimensional convolutions and discrete
Fourier transforms, in Fast algorithms in digital image processing. M.: Radio and
communication, 1984, pp. 43-88.
[4] Sereda L. A. An algorithm of fast calculation of the two-dimensional discrete
Fourier transform. Izv. vuzov SSSR, Radioelectronica, 1983, vol. 26, no. 7, pp. 18–22.
This page intentionally left blank
176 200
174 160
140
173
120
172
100
171
80
170
60
169 40
168 20
167 0
0 50 100 150 200 250 0 50 100 150 200 250
(a ) o rigina l (b ) 1 -D signal (c ) 1 -D DF T
1 176
original signal
175
0.95
174
0.9
173
0.85 172
0.8 171
new signal
170
0.75
169
0.7
168
0.65 167
0 50 100 150 200 250 0 50 100 150 200 250
(d ) f actors (e ) n ew signal
250
200
150
100
50
0
0 50 100 150 200 250
(f ) f requency-poi nt s (g ) e nhanced
T1,2
T1,1
6
9
6
imaginary part y(n) of the signal z(n)=x(n)+jy(n)
4
2
2
F(0)
7
0
1
F(1)
5 0
−2
3
−4
4
−6
8
−8
−8 −6 −4 −2 0 2 4 6 8
6
7
5
2
1 F(0)
−4
6
−6
−8
−8 −6 −4 −2 0 2 4 6 8
S1,1,7
S1,1,3
−5
10
10
5
5
0
0
−5
−5
−10 −10
FIGURE 2.4: The net with knots of the grid 32 × 32 in the 3-D space with
locus of two spirals S1,1,3 and S1,1,7 .
20 Re g’
T
3,1
10
−10
f’ T
−20 3,1
0 50 100
(a) (b)
700 200
600
500 100
400
0
300
200 200
100 100
0 200 250
0 50 100 0 50 100 150
0
(c) (d)
FIGURE 2.18: (a) Tree image 256 × 256, (b) the paired splitting-signal fT3,1
′
and the real part of the modified signal, (c) the 1-D DFT of the modified
signal, and (d) the arrangement of values of the 1-D DFT at frequency-points
′
of the subset T3,1 . (The 1-D DFT is shown in the absolute scale.)
0
l(16)
0.25
0.25
0.375
3
y and m
0.5
4
l(20)
0.625
0.75
0.875
1
0 1 2 3 4 5 6 7
FIGURE 3.22: Mask of the paired function χ′2,1,0 (n,m) and rays.
image f(x,y) with 7 rectangles discrete image f(n,m)
1
10
0.8
20
0.6 1
3 30
72
0.4 40
4
5
50
0.2
6
60
0
0 0.2 0.4 0.6 0.8 1 10 20 30 40 50 60
intensities: 5 11 12 8 3 3 9 grid 64x64
FIGURE 4.2: Seven color rectangles and the discrete gray-scale image com-
posed by these rectangles.
20
0.8
5 4
40
0.6 9 2
7 60
8
10
0.4 6 1 80
0.2 100
3
120
0
0 0.2 0.4 0.6 0.8 1 20 40 60 80 100 120
intensities: 8 10 16 9 16 9 15 4 11 8 cpu time/rect=0.40 min
FIGURE 4.6: Ten random rectangles (left) and the reconstructed image
(right).
10 rectangles and grid 256x256 reconstructed image 256x256
1
0.8 1 8 50
9
0.6 100
5
3
0.4 10 150
4
6 7
0.2 200
2
0 250
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 4 7 11 6 14 9 15 5 11 1 cpu time/rect=4.56 min
FIGURE 4.7: Ten random rectangles (left) and the reconstructed image
(right).
0.8 50
2
8 100
0.6
7
0.4 1 4 150
6
5 3
0.2 9 200
10
250
0
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 1 11 3 5 5 8 4 10 3 13 cpu time/rect=1.86 min
FIGURE 5.37: Ten colored rectangles and the discrete gray-scale image of
size 257 × 257, which is composed by these rectangles.
random rectangles and grid 257x257 reconstructed image 257x257
1
9
0.8 6 50
5 1
0.6 100
28
10
4
0.4 150
7
3
0.2 200
250
0
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 10 4 15 12 5 11 16 7 9 17 cpu time/rect=1.80 min
FIGURE 5.41: Image with ten rectangles and its reconstruction 257 × 257.
0.8 0.8
0.6 0.6
0.4 0.4
0.2 0.2
0 0
0 0.5 1 0 0.5 1
FIGURE 6.13: The field functions of two G-particles (1, 1) and (2, 1).
0.04
0.5
0.02
0 0
−0.02
−0.5
−0.04
−1 −0.06
−1 −0.5 0 0.5 1 −0.05 0 0.05
FIGURE 6.14: Map of G-rays in the UH-square of number 26 and its central
component.
10 rectangles on 128x128 128x128: Covering by 192 projections
1
20
0.8 3
2 7 40
0.6
10 60
5 6
0.4 80
1 9
4
8
0.2 100
120
0
0 0.2 0.4 0.6 0.8 1 20 40 60 80 100 120
(a) (b)
FIGURE 6.18: (a) Ten rectangles and the lattice 128 × 128 and (b) the
reconstructed image.
0.8 50
6
0.6 100
5
2
0.4 7 150
3 1
4 200
0.2
0 250
0 0.2 0.4 0.6 0.8 1 50 100 150 200 250
intensities: 4 2 14 11 9 13 5 cpu time/rect=4.90 min
FIGURE 7.1: Image with seven random rectangles and the reconstructed
discrete image 256 × 256.
Electrical Engineering
Image Processing
Tensor Transform and Discrete
Tomography with MATLAB®
Image
Focusing on mathematical methods in computer tomography, Image
Processing: Tensor Transform and Discrete Tomography with
MATLAB® introduces novel approaches to help in solving the problem
of image reconstruction on the Cartesian lattice. Specifically, it
Processing
discusses methods of image processing along parallel rays to more Tensor Transform and Discrete
quickly and accurately reconstruct images from a finite number of
projections, thereby avoiding overradiation of the body during a
computed tomography (CT) scan. Tomography with MATLAB®
The book presents several new ideas, concepts, and methods, many
of which have not been published elsewhere. New concepts include
methods of transferring the geometry of rays from the plane to the
Cartesian lattice, the point map of projections, the particle and its X-ray set
field function, and the statistical model of averaging. The authors
supply numerous examples, MATLAB®-based programs, end-of-chapter
problems, and experimental results of implementation.
image f(n,m)
The main approach for image reconstruction proposed by the authors
differs from existing methods of back-projection, iterative reconstruction,
and Fourier and Radon filtering. In this book, the authors explain how
to process each projection by a system of linear equations, or linear
convolutions, to calculate the corresponding part of the 2-D tensor
or paired transform of the discrete image. They then describe how projection
to calculate the inverse transform to obtain the reconstruction. The ø=26.565º
proposed models for image reconstruction from projections are simple
and result in more accurate reconstructions.
K14749
ISBN: 978-1-4665-0994-8
90000
9 781466 509948
Artyom M. Grigoryan n Merughan M. Grigoryan