RE: Jeri videoboard gfxconv

From: Christopher Phillips (
Date: 2001-05-25 13:03:51

> -----Original Message-----
> From: Hársfalvi, Levente []
> Sent: 25 May 2001 10:09
> To:
> Subject: Re: Jeri videoboard gfxconv

> ...Well, this is what is above me at the moment. Anyone with 
> some ideas on a
> working algorithm?...


I can't see a simple way to finish the algorithm as you have
started it, but I have a suggestion of an alternative

For each 4x8 tile in the source image, compute some measure
of the nature of the colours in that tile; for example
the means of R,G&B and the 3x3 covariance matrix.
You then have an 80x50x12 'image' of what sorts of colours
reside in each tile.

Quantise that down to 16 tile categories using standard
quantisation algorithms (median cut or whatever).

You then have 16 different subsets of tiles, for each of which
you can generate an optimal 16-entry palette from which you
can choose any three for any tile in the set.

This is of course ignoring the background colour for now;
perhaps sanest to pick one in advance of generating
the smaller palettes, and allocate it to the sub-palette
that would least miss control of it's 16th colour,
and treat all the other sub palettes as already having
a 17th entry that is the background colour.

Hmm. Thinking a little more, a better alternative might
be to quantise the 80x50 image down to 16*(16/3) = 80
sets; you can then generate 80 independent three-entry
palettes, and group them into 16 sets of 5 palettes
each for packing into the sub-palettes.


-Virus scanned and cleared ok
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail

Archive generated by hypermail 2.1.1.