__header__

Description

The median cut algorithm
  1. Scan the image, and insert colors into an octree structure.
  2. If the number of leaf nodes in the octree exceeds the number of final colors, reduce the tree.
  3. When the image scan is finished, the leaf nodes of the octree contain the reduced image colors.
Rescan the image to map image colors to their appropriate octree leaves.

An octree is a tree data structure in which each internal node has exactly eight children

orig by Dean Clark

Inputs

CIFViewer

CIF

ROI

Parameters

Image

NbLevel1

nb level to go deep
max is 8 recommend to leave at 6

MinColorDensity

min number pixels at the defined color

MaxNbcolors

CopyImage

RefreshViewer

__footer__