The algorithm of the rational-based K-SOM quantizer
consists of two main parts which are the SOMFrontEnd
and the SOMCorePE. These are presented in
Algorithms 1 and 2, respectively. The SOMFrontEndpart
is responsible for initialising a codebook C, a
learning rate array . . .; an
r k; . . ., initialising and controlling
a learning rate index parameter k, and presenting
a pixel Pt for the SOMCorePE-part during the learning
and the pixel-mapping stages. The SOMCore is responsible
for finding the winner codeword for a given pixel
Pt and updating the winner’s weight in the codebook
generation stage or return the winner’s index in the
pixel-mapping stage. It is noted that instead of direct
updating the weight of one winner and many neighbours
for a pixel Pt, the SOMCorePE updates the weight of all
related codewords, i.e. all codewords which are in the
neighbouring radius of the winner codeword. This is
iteratively performed during visits to the codewords (the
first if-then-else in the SOMCorePE-algorithm). The
algorithm is presented in the form that there are
h-instances of SOMCorePE running in parallel. This is
done in order to make it very close to hardware implementation
and operation.