针对已有图像灰度化方法不能同时体现原始图像的全局和局部对比度,且不能保持灰度像素的灰度值等问题,提出一种基于主色检测与灰度传播的彩色图像灰度化方法.首先提出一种基于直方图峰值的主色检测方法,用于提取输人图像中具有代表性的少量主要颜色特征;然后采用基于梯度域的主色灰度化方法将图像主色映射到灰度空间,最大程度地在灰度空间保持主色在彩色空间的视觉对比度;再利用基于局部线性嵌入的灰度传播方法,将主色灰度值和原有灰度像素的灰度值扩散到与其颜色相似的像素上;最后检查图像中是否存在没有被灰度化的彩色像素,如果存在,则使用基于梯度域的局部灰度化方法将其灰度化,得到最终的灰度图像.大量实验结果表明,该方法将全局和局部对比度保持有机结合,得到的灰度图像较好地保持了彩色图像中色彩之间的差异性,并且保持了灰度像素的灰度值.
As state-of-the-art color2gray methods can not guarantee the simultaneous preservation of global and local contrast, as well as the values of grayscale pixels, a color2gray method based on dominant color detection and grayscale propagation is put forward in this paper. Firstly, this paper proposes a histogram peaks based dominant color detection method to extract a small representative colors set for the input image. Secondly, these dominant colors are mapped to grayscale space with gradient domain based color2gray method, which can preserve the contrast in color space as much as possible. Then, grayscale values of dominant colors and grayscale pixel are propagated into nearby colors through local linear embedding model. Finally, this method detects if there are pixels which haven’t been decolorized and transform them to grayscale ones. Numerous experimental results show that this method simultaneously preserves the global and local contrast as well as the grayscale pixels and thus the diverse scene as shown in the input color image.