28、树莓派嵌入式系统中的人脸识别与监控技术

树莓派嵌入式系统中的人脸识别与监控技术

1. 人脸识别方法

在人脸识别领域,Eigenfaces和Fisherfaces是两种常用的方法。Fisherfaces和Eigenfaces一样,允许对投影图像进行重建。但由于Fisherfaces主要用于识别区分不同主体的特征,所以它对原始图像的近似效果并不如Eigenfaces。以下是一段使用Fisherfaces进行图像重建的Python代码:

from tinyfacerec.subspace import project , reconstruct 
E = []
for i in xrange(min(W.shape[1], 16)): 
    e = W[:,i].reshape(-1,1)
    P = project(e, X[0].reshape(1,-1), mu) 
    R = reconstruct(e, P, mu)
    # reshape and append to plots
    R = R.reshape(X[0].shape) 
    E.append(normalize(R,0,255)) 
# plot them and store the plot to "python_reconstruction.pdf" 
subplot(title="Fisherfaces Reconstruction Yale FDB", images=E, rows=4, cols=4, sptitle ="Fisherface", colormap=cm.gray, filename="python_fisherfaces_reconstruction.pd
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值