big10p:
There are lots of articles. Just google on "octree color count" for example. Most of these describe ways to quantize images to reduce their numbers to a preset max value and get a good result. But most of these methods use octrees in similar ways that RoyFerriby describes.
RoyFerriby:
Thanks! Great explanation! Could you perhaps explain how to do this with some basic code example? I feel my brain is lost in all these nodes and trees and leaves. ;)
Should I use arrays for pointers, or types?
Just to clarify, as far as I can tell an octree seems to be bound to max 8 element in each level. The method RoyFerriby describes is the same but each level contains up to 256 elements. So the name octree might not be 100% accurate here... but who cares? Were going to the beach right? ;)
There are lots of articles. Just google on "octree color count" for example. Most of these describe ways to quantize images to reduce their numbers to a preset max value and get a good result. But most of these methods use octrees in similar ways that RoyFerriby describes.
RoyFerriby:
Thanks! Great explanation! Could you perhaps explain how to do this with some basic code example? I feel my brain is lost in all these nodes and trees and leaves. ;)
Should I use arrays for pointers, or types?
Just to clarify, as far as I can tell an octree seems to be bound to max 8 element in each level. The method RoyFerriby describes is the same but each level contains up to 256 elements. So the name octree might not be 100% accurate here... but who cares? Were going to the beach right? ;)