Fast color quantization in OpenCV

后端 未结 2 920
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 11:50

How can I reduce the number of distinct colors in images using OpenCV (+ C++) the fastest way possible? I don\'t want the complete code. I\'m already doing it using kmeans b

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-28 12:03

    Fast pairwise nearest neighbor based algorithm with 8 colors
    High quality and fast

    Efficient, Edge-Aware, Combined Color Quantization and Dithering with 8 colors
    Higher quality for 32 or less colors but slower

    Spatial color quantization with 8 colors
    Higher quality for 32 or less colors but the slowest

    Sample c++ code
    For the speed, it might be depending on GPU parallel programming C/C++.

提交回复
热议问题