How is the photoshop cutout filter implemented?

前端 未结 9 818
日久生厌
日久生厌 2021-02-03 13:21

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

9条回答
  •  温柔的废话
    2021-02-03 13:32

    The number of levels seems to resemble how cell-shading is done and this is how I'd implement that part in this case: you simply take this histogram of the image and divide it into the "No. of levels" amount of sections then calculate an average for each section. Each color in the histogram will then use that average in stead of their original color.

    The other two parameters require some more thinking but 'Edge simplicity' seems to detonate the number of segments the shapes are build up off. Or rather: the number of refinements applied to some crude Image Segmentation Algorithms. The fidelity slider seems to do something similar; it probably controls some kind of threshold for when the refinements should take place.

    This might help

提交回复
热议问题