Image Processing Reference
In-Depth Information
Fig. B.1 ( a ) Point
representation. ( b ) Vector
representation
Result =0;
for
(j = 0;
j < M;
j = j+1)
{
for
(i = 0;
i < N;
i=i+1)
{
Result
=
Result
+
GetPixel ( input ,
i ,
j );
}
}
B.5
Vector
In the 2D coordinate system in Fig. B.1 a point is defined as P(x 1 ,y 1 ) .Thesame
point can be represented as a vector :
x 1
y 1
p
=
(B.10)
A vector is often written as a lowercase letter with an arrow above. It can be
interpreted a s a line w ith a slope
y 1
x 1
and a length. The length of the vector is defined
x 1 +
p
y 1 .
We can arrange the vector as a row (as opposed to a column) by taking the trans-
pose of the vector, p T . That is,
as
=
p T
=[
x 1
y 1 ]
(B.11)
or in other words:
x 1
y 1
T
x 1
y 1
T
=[ x 1
y 1 ] ,
[ x 1
y 1 ]
=
(B.12)
Say we have two vectors: p 1 T
and p 2 T
=[
55
]
=[
20
]
. We can then calcu-
late the sum of p 1 and p 2 as
Search WWH ::




Custom Search