Lines Matching refs:n2

84 <p>n2: Number of pixels whose color is not represented in a node at lower depth in the tree;  initially,  n2 = 0 for all nodes except leaves of the tree.</p>
86 <p>Sr, Sg, Sb: Sums of the red, green, and blue component values for all pixels not classified at a lower depth. The combination of these sums and n2 will ultimately characterize the mean color of a set of pixels represented by this node.</p>
90 <p>Reduction repeatedly prunes the tree until the number of nodes with n2 &gt; 0 is less than or equal to the maximum number of colors allowed in the output image. On any given iteration over the tree, it selects those nodes whose E count is minimal for pruning and merges their color statistics upward. It uses a pruning threshold, Ep, to govern node selection as follows:</p>
95 <dd> Ep = 0 while number of nodes with (n2 &gt; 0) &gt; required maximum number of colors prune all nodes such that E &lt;= Ep Set Ep to minimum E in remaining nodes </dd>
99 <dd> When a node to be pruned has offspring, the pruning procedure invokes itself recursively in order to prune the tree from the leaves upward. n2, Sr, Sg, and Sb 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. </dd>
101 <dd> For each node, n2 pixels exist for which that node represents the smallest volume in RGB space containing those pixel's colors. When n2 &gt; 0 the node will uniquely define a color in the output image. At the beginning of reduction, n2 = 0 for all nodes except a the leaves of the tree which represent colors present in the input image. </dd>
103 <dd> The other pixel count, n1, indicates the total number of colors within the cubic volume which the node represents. This includes n1 - n2 pixels whose colors should be defined by nodes at a lower level in the tree. </dd>
110 <dd> First, the assignment phase makes one pass over the pruned color description tree to establish the image's color map. For each node with n2 &gt; 0, it divides Sr, Sg, and Sb by n2 . 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. </dd>