这几天在看文章的时候,看到这么一段话:
“First, we normalize the grayscale intensity in the eye region for each of the aligned facial images to zero mean and unit variance.”
意思就是第一步对眼睛的区域进行零均值单位方差。第一次知道还有这玩意。。
经过查阅matlab prestd函数就代表了这个意思:
试验一下:
>> a=[1 2 3 4]
a =
1 2 3 4
>> [pn m std]=prestd(a)
Warning: PRESTD is an obsolete function.
> In obs_fcn at 18
In prestd at 10
Use MAPSTD instead.
pn =
-1.1619 -0.3873 0.3873 1.1619
m =
2.5000
std =
1.2910
>>
其中pn代表已经零均值单位方差的矩阵,m代表a的均值 std代表a的方差
转成C++代码就应该是这样:
in