目的针对已有主色提取方法中存在的严重误检和漏检现象以及要求主色数量固定等问题,在分析主色特征含义的基础上提出了一种用于主色提取的直方图峰值筛选与剔除算法。方法首先根据像素的空间聚集度统计出图像的鲁棒颜色直方图,并提取其局部峰值形成候选主色集;然后根据各候选主色的隶属像素数和空间分布特征以及它们之间的共同相似像素数,对候选主色进行循环筛选;最后通过候选主色剔除过程,将隶属像素数目过少、空间分布过于分散或与其他候选主色差异较小的候选主色去掉,得到最终的图像主色。另外,针对已有主色评价方法比较片面的缺陷,设计了一个能够全面反映主色影响因素的主色综合评价模型。结果大量的实验结果表明,本文算法提取的主色在代表图像颜色特征的有效性上超越了已有的方法,且本文算法平均评价分数是已有最高得分算法的1.1倍,相对提高了约10个百分点。结论鉴于该算法所展示的优越性能,它在图像检索、分割和编辑等领域具有较大的潜在应用价值。
Objective To address the issues of severe missing and false detection rates and application of a fixed dominant color number in state-of-the-art dominant color extraction methods, a histogram peak-filtering and rejection-based algorithm is proposed. The algorithm identifies a small number of dominant colors, with such characteristics as high spatial aggrega- tion degree, highly similar color pixels, small representative error, and large color difference. Method First, a robust color histogram of the input image is counted by thresholding the spatial aggregation degree of each pixel to avoid the influence of noise. The peaks of the color histogram within a relatively small color range are selected as a candidate dominant color set. Second, the selection color range for the color histogram peaks is progressively increased, and a candidate dominant color fihering process is implemented to reduce similar coiors in the candidate dominant color set. When two candidate dominant colors fall in the same selection color range, the one with more similar pixel numbers is preserved. The other one is re- moved if it contains similar spatial distributions or more common similar pixels ; otherwise, it is retained. Finally, the dora-inant colors are determined through a candidate dominant color rejection process to remove false candidate dominant colors, which are those with a scattered spatial distribution, a few similar pixels in the order of a magnitude, and a small color difference with the others in the candidate dominant color set. In addition, a comprehensive evaluation model is established for the dominant colors of an image. The model can reflect all influencing factors for the dominant colors and avoid the uni- lateral defects of the traditional evaluation approach. Result Experimental results prove that the proposed dominant color ex- traction method is superior as an effective representation of the color features of an image. The average appraisal score is 1.1 times that of the highest score of one of the previous met