Preserving edges would be nice, so here's the idea?
- optionally downscale the image some. 1/2 or 1/4, maybe, to save compute and memory.
- edge deteciton (wikipedia: Canny Edge Detection)
- optionally slightly blur the edge-image so we can get some colours around the edge? experiment here.
- consider colours only on the edge. if we blurred then perhaps we can use the grey value to further bias our selection. we could compute some kind of score where we sum the gray values where the colour is (normalized 0-1).
i don't know how this'll work it's just an idea.
Preserving edges would be nice, so here's the idea?
i don't know how this'll work it's just an idea.