Get dominant colors from image discarding the background

后端 未结 4 846
盖世英雄少女心
盖世英雄少女心 2021-02-02 02:42

What is the best (result, not performance) algorithm to fetch dominant colors from an image. The algorithm should discard the background of the image.

I know I can build

4条回答
  •  离开以前
    2021-02-02 03:08

    As far as my knowledge of image processing algorithms extends , there is no certain way to get the "foreground"; it is only possible to get the borders between objects. You'll probably have to make do with an average, or your proposed array count method. In that, you'll want to give colours with higher saturation a higher "score" as they're much more prominent.

提交回复
热议问题