23.11.2012 Views

Master Thesis - Hochschule Bonn-Rhein-Sieg

Master Thesis - Hochschule Bonn-Rhein-Sieg

Master Thesis - Hochschule Bonn-Rhein-Sieg

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5. Algorithms <strong>Master</strong> <strong>Thesis</strong> Björn Ostermann page 69 of 126<br />

result of this addition has to be divided by the combined values of the Gaussian matrix. Therefore, in<br />

praxis, the values in a Gaussian matrix used in a computer program add up to one.<br />

�<br />

1<br />

4<br />

6<br />

4<br />

1<br />

1 4 6 4 1<br />

1 4 6 4 1<br />

4 16 24 16 4<br />

6 24 36 24 6<br />

4 16 24 16 4<br />

1 4 6 4 1<br />

Figure 46: Gaussian matrix, build by multiplying a Gaussian vector with its transpose<br />

– image created in collaboration with [81]<br />

The disadvantage of this approach is the high computational effort. A filter with the width and height<br />

n<br />

n<br />

of n uses n multiplications and n �1<br />

additions. With the 5 times 5 filter in the given example,<br />

each centre element needs 25 multiplications and 24 additions.<br />

Due to the fact that a Gaussian matrix is build by multiplying a Gaussian vector with its transpose (see<br />

Figure 46), the computational effort can be reduced by applying each vector separately.<br />

The optimized algorithm, applied in this project, uses the Gaussian vector, to convert the original<br />

matrix into a temporary matrix (see Figure 47a), which is then turned into the result matrix by<br />

applying the transpose of the Gaussian vector (see Figure 47b).<br />

a) b)<br />

1<br />

4<br />

6<br />

4<br />

1<br />

1 4 6 4 1<br />

Figure 47: a) Converting the original matrix (blue) to a temporary matrix (green)<br />

b) and converting the temporary matrix into the result matrix (yellow)<br />

– images created in collaboration with [81]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!