Sd b u in a node being pruned are always added to the corresponding data in that node's parent. This retains the pruned node's color characteristics for later averaging. For each node, nd 2 u pixels exist for which that node represents the smallest volume in RGB space containing those pixel's colors. The other pixel count, nd 1 u , indicates the total number of colors within the cubic volume which the node represents. This includes nd 1 u - nd 2 u pixels whose colors should be defined by nodes at a lower level in the tree.
Assignment generates the output image from the pruned tree.
First, the assignment phase makes one pass over the pruned color description tree to establish the image's color map. Sd g u , and Sd b u by nd 2 u . This produces the mean color of all pixels that classify no lower than this node. Each of these colors becomes an entry in the color map. Finally, the assignment phase reclassifies each pixel in the pruned tree to identify the deepest node containing the pixel's color.