Patent ID: 8407168

Claim:
A codebook generating method, comprising: a dividing and transforming step configured to divide an original image into a plurality of original blocks and transforming the original blocks into a plurality of original vectors; a dividing step configured to group the original vectors using a grouping algorithm so as to obtain a plurality of centroids; a first layer neuron training step configured to select a portion of the centroids as first-level neurons, wherein the centroids are used as samples for training the first-level neurons via a Self-Organizing Map (SOM) method; a grouping step configured to assign each of the original vectors to a closest first-level neuron so as to obtain a plurality of groups; a second layer neuron assigning step configured to assign a number of second-level neurons in each of the groups based on a distortion rate of the original vectors in each of the groups, and to select a portion of the original vectors in each of the groups as the second-level neurons based on the assignment, wherein the number of the second-level neurons is determined according to the following formula: N g = [ d g ∑ d g × codebook_size ] , wherein is the total distance between all the original vectors in a gth group and a corresponding centroid of the gth group, and codebook_size is the size of the codebook; and a second layer neuron training step configured to define the original vectors in each of the groups as samples, train the second-level neurons in each of the groups using the SOM method to obtain a plurality of final neurons, and store vectors corresponding to the final neurons in a codebook.