Photoshop has a lot of cool artistic filters, and I\'d love to understand the underlying algorithms.
One algorithm that\'s particularly interesting is the Cutout filter
Got a simple solution, which would theoretically produce something similar to that filter. Somehow similar to what Ismael C suggested.
Edge Simplicity controls window size. Maybe window should be weighted.
But unlike it happens for regular windowed filters this one would take only a fixed size portion of random pixels from this window. The size of the portion is controlled with Fidelity parameter.
Set the pixel color to the median of the sample.
Given we have some posterization algorithm, it is applied afterwards.
Here we go!
Please report results if you implement it.
PS. I really doubt that segmentation is used at all.