April 2020
Intermediate to advanced
438 pages
12h 2m
English
We used the train_random() function to train the SOM by picking pixel samples at random from (flattened) image data. Along with the input image, it accepts a second parameter, num_iteration, that denotes the maximum number of iterations (one iteration per sample pixel).
We then used the function quantization to assign a code book (the weights vector of the winning neuron) to each pixel and thereby perform color quantization.
Read now
Unlock full access