Image Processing Reference
InDepth Information
B
Mathematical Definitions
This appendix provides some basic mathematical definitions. The appendix is in
tended for readers who do not have a mathematical background or readers who
need a “brushup”.
B.1
Absolute Value
The
absolute value
of a number,
z
, is written as
Abs(z)
or

z

. It is calculated by
deleting the “minus” in front of the number. This means that
−
150
=
150. Mathe
matically the absolute value of a number,
z
, is calculated as
z
2

z
=
(B.1)
In terms of programming it can be written as
if
(z < 0)
z=
−
1
∗
z;
B.2
min
and
max
The
min
value of a set of numbers is written as min
{
x
1
,x
2
,...,x
n
}
and simply
means the smallest number in the set. For example, min
{
7
,
3
,
11
,
2
,
42
}=
2. The
max
value of a set of numbers is written as max
{
x
1
,x
2
,...,x
n
}
and simply means
the biggest number in the set. For example, max
42. In terms of
programming the max operation can be written as follows, where we assume that
N
numbers are present in the list and that they are stored in
list
{
7
,
3
,
11
,
2
,
42
}=
[]
:
MaxValue= l i s t [ 0 ] ;
for
(i = 1;
i < N;
i = i+1)
{
if
( l i s t [ i ]
>
MaxValue )
MaxValue
=
l i s t [ i ] ;
}