Builds 3D histogram grid, searches for local maxima of the hit count

Based on Palette class from Android SDK

Median cut

Clusters similar colors in 3D model, sort them by volume and returns base colors for each block