linear palette extraction
category: code [glöplog]
Also you will have some color inversions...
I think what 216 wrote is very sensible, but I also love kb's suggestion of transforming this problem into Traveling Salesperson.
baah: funny thing it doesnt look like a curve at all! but if one "zooms out" maybe those are just directions/arrows that in the end looks like a curve from a distance apart?
errr... Hilbert's curve looks exactly like a curve, you can define a mapping from [0;1] to the red line. And the "magic" is that when the Hilbert's curve creation process is iterated to infinity the mapping goes from [0;1] (line) to [0;1]² (plane)
Wouldn't an algorithm where you continuously find the closest colour to any given colour, and stick groups of colours together until you have one big group work?
that plasma? thing is the image already has 40000 (irfan counted) colors due to compression. covert back to 256 you have a palette to sort.
if it's raw 256 just start at the corner and walk neighbors for all unique colors. weight rgb against the last. walk the closest match until you have 256 color or covered the whole picture atleast once.
just a simple thought. i didn't code that. i dunno know if that does?!? it's just how i'd tackle that one picture with it's flow.
d-.-b
if it's raw 256 just start at the corner and walk neighbors for all unique colors. weight rgb against the last. walk the closest match until you have 256 color or covered the whole picture atleast once.
just a simple thought. i didn't code that. i dunno know if that does?!? it's just how i'd tackle that one picture with it's flow.
d-.-b
ohh... in case no unique color is found a farther walk in a random direction away from the last direction is a good idea to walk further. will compute endless maybe but you'll have it completely covered "somewhen". do you have time? :D
i remember using a palette sorting tool made by kvark/prone back in the MS-DOS days. Perhaps you can find it somewhere. I think it was called phone palette or something
phone=phong
rasmus: impossible to find it.