English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 01 March 2011, 15:17   #1
h0ffman
Registered User
 
Join Date: Aug 2008
Location: Salisbury
Posts: 746
Octree Colour Qunatisation

Hey guys

I've been reading up on Octree colour quantisation. I read this..

http://msdn.microsoft.com/en-us/library/aa479306.aspx

I understand it up to and including traversing the bits of each RGB element to produce a leaf node. The bit I'm having trouble understanding is what to do with it all after that...

Quote:
As previously explained, when a color is inserted into an Octree, the nodes are traversed. When a leaf node is found, the count of pixels of this particular color is incremented in the node, and the red, green, and blue components are added to the R, G, and B values within the node. These numbers are used to produce an average color based on dividing each color value by the number of pixels of that color.
I take it the leaf node is the total result of the traversing?

help!
h0ffman is offline  
Old 01 March 2011, 18:21   #2
ara
Registered User
 
Join Date: Oct 2009
Location: Belgium
Age: 50
Posts: 42
Quote:
The bit I'm having trouble understanding is what to do with it all after that...
At the end of the color insertion procedure, you will get an octree where the leaves tell you
  • the number of pixels represented by the leaf
  • the "average" color represented by the leaf
In general, you limit the size of the tree in advance, otherwise your tree would have as many leaves as different colors in your picture with every leaf representing exactly one color.
The next step is to reduce the number of leaves. For example, from 32768 leafs (maximum depth 5) to 64. By definition, leaves with a common parent represent similar colors. You can reduce such leaves to one single leaf by averaging their colors (it's a weighted average of course). The challenge is to find the best leaves for the reduction process. Read this:
http://git.hashcollision.org/project...on/article.pdf

Once your tree has the right size, you use the tree to map the original colors to the reduced set of colors.
ara is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Colour fading? h0ffman Coders. General 17 02 December 2018 12:41
Colour issue AtlasRapture support.WinUAE 7 17 July 2010 11:39
Colour space absence support.Hardware 5 04 June 2009 14:57
Will someone colour my worm? NovaCoder project.WHDLoad 7 25 February 2009 20:34
Colour flickering Vikingex support.Hardware 6 31 January 2008 23:47

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:57.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07232 seconds with 15 queries