如何让图像变明亮 (直方图均衡化)?
代码说明:
翻译 maninwest@Codeforge 作者:Mr. Lai Tai-Yu@CodeProject 有时候,我们发现照片不明亮,这个是可以修复的。在图像处理领域,这叫做直方图均衡化,通过扩展图像的直方图让照片变明亮。背景操作系统: Microsoft Windows 7 专业版 (64 位) 开发实用程序: Microsoft Visual Studio 2010使用代码 // The histogram array of the red channel. double aryHistogramR[256] = {0}; // The transform of histogram array of the red channel. double aryTransformR[256] = {0}; // The sum of pixel"s gray of the red channel. double dobSumR = 0.0f; // The histogram array of the red channel. double aryHistogramG[256] = {0}; // The transform of histogram array of the red channel. double aryTransformG[256] = {0}; // The sum of pixel"s gray of the red channel. double dobSumG = 0.0f; // The histogram array of the red channel. double a
下载说明:请别用迅雷下载,失败请重下,重下不扣分!