go-cross-stitch
go-cross-stitch copied to clipboard
Implement octree color quantization
Right now I have implemented middle-cut color quantization. It works pretty well, but for some images I get fewer colors in the palette than the number of segments. The middle-cut algorithm doesn't account for segments that average out to the same colors.
Octree color quantization should be faster at getting a palette. People say middle cut ends up looking better, but octree is faster, especially for larger images. It might be easier to modify as well, to get a certain number of colors in the palette other than a power of 2.