注意:这篇文章上次更新于1995天前,文章内容可能已经过时。
This article was last updated1995 days ago, the content may be outdated.
预备知识
Z-score 标准化方法
Z-score 标准化方法是一种数据标准化方法,这种方法给定原始数据的均值(mean)和标准差(standard deviation) 进行数据的标准化,经过处理的数据均值为 0 ,方差为 1 。
其中, 为原始数据的均值, 为原始数据的标准差。
其效果如下图所示:
原始数据的分布直方图
原始数据的均值和标准差分别为 0.25 和 0.1
处理后的数据直方图分布
处理后数据的均值和标准差分别为 0 和 1
Sigmoid 函数
Sigmoid 函数是一个具有 S 形曲线的函数,是良好的阈值函数,在(0 , 0.5)处中心对称,在(0,0.5)附近具有较大的斜率,而当数据趋向于正无穷和负无穷的时候,映射出来的值会无限趋近于 1 和 0 。
Sigmoid 函数的曲线如图:

Prerequisites
Z-score Standardization Method
The Z-score standardization is a data standardization method. Given the mean and standard deviation of the original data, it standardizes the data; the processed data has a mean of 0 and a variance of 1.
where is the mean of the original data and is the standard deviation of the original data.
Its effect is shown in the following figures:
Histogram of the original data distribution
The mean and standard deviation of the original data are 0.25 and 0.1, respectively
Histogram distribution of the processed data
The mean and standard deviation of the processed data are 0 and 1, respectively
Sigmoid Function
The Sigmoid function is a function with an S-shaped curve and is a good threshold function. It is centrally symmetric about (0, 0.5), has a relatively large slope near (0, 0.5), and when the data tends to positive and negative infinity, the mapped values infinitely approach 1 and 0.
The curve of the Sigmoid function is shown in the figure:

算法简介
首先对输入图像分通道进行 Z-score 数据标准化:
其中 , 为输入数据的均值, 为输入数据的标准差。
将此标准化数据输入 Sigmoid 函数实现数据的归一化。
我们根据此标准化图像 N 计算 值,用于对原图像进行非线性的颜色校正。
其中:
Algorithm Overview
First, apply Z-score standardization to the input image channel by channel:
where , is the mean of the input data, and is the standard deviation of the input data.
Feed this standardized data into the Sigmoid function to normalize the data.
Based on this standardized image N, we compute the values, which are used to perform nonlinear color correction on the original image.
where:
1 | function [outputs] = Normalize(arg,str) |
1 | function output = MyCC(input) |
Experimental Results
Li-Chongyi’s Images
Left is the original image, right is the result image.


























































WB Images
Left is the original image, right is the result image.







小声说ฅʕ•̫͡•ʔฅ
这个方法其实就是融合了最近刚刚发现的一种归一化方法和小红师姐现在的颜色校正算法。这个归一化是真的好用,我还要再用。😁
从实验结果上看和小红师姐原来方法的结果也极其相似,我试了一些原方法会毁掉的一些图片,现在依然会毁掉,大概就是那种图片要谨慎使用伽马校正吧。
把这个方法可以作为图像增强框架的预处理步骤,这些图片应该已经足够发一篇 高水 平论文了吧。
最后还要说一个可怕的事实:
这个 Sigmoid 归一化实在是太牛逼了,很多时候归一化后的图像 N 就已经很优秀了(起码从 Color Cast 的角度看)。
左为原图 input;中为本算法结果图 output;右为中间结果 N
那么问题来了,如果不加伽马校正,就一个归一化算创新吗?可是多数情况加了还不如不加,难受😭
本着“没有最水,只有更水”的写论文原则,就暂且忽略这个事实吧。
但是根据我对另一句名言的理解,即总有一张图片适合你的算法,我要强行解释我伽马校正的意义,对于下图来说,N 是不是存在着过度的增强呢?
左为原图 input;中为本算法结果图 output;右为中间结果 N
A Whisper ฅʕ•̫͡•ʔฅ
This method is actually a fusion of a normalization method I recently discovered and Senior Sister Xiao Hong’s current color correction algorithm. This normalization is really useful, and I will keep using it. 😁
In terms of experimental results, it is also extremely similar to the results of Senior Sister Xiao Hong’s original method. I tried some images that the original method would ruin, and they are still ruined now. I guess those are the kind of images where gamma correction should be used with caution.
This method can be used as a preprocessing step in an image enhancement framework, and these images should already be enough to publish a high-lev…el paper, right?
Finally, let me mention a terrible fact:
This Sigmoid normalization is simply too awesome. In many cases, the normalized image N is already excellent (at least from the perspective of Color Cast).
Left is the original input image; middle is the output result of this algorithm; right is the intermediate result N
So here is the question: without gamma correction, is just a normalization innovative? But in most cases, adding it is worse than not adding it. How sad😭
Following the paper-writing principle of “no most watery, only more watery”, let’s just ignore this fact for now.
But based on my understanding of another famous saying, namely “there is always an image that fits your algorithm”, I want to force an explanation of the significance of my gamma correction: for the image below, doesn’t N exhibit over-enhancement?
Left is the original input image; middle is the output result of this algorithm; right is the intermediate result N
左为原图 input;中为本算法结果图 output;右为中间结果 N
左为原图 input;中为本算法结果图 output;右为中间结果 N

