FaceRecognizer.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Gabor-Filter-Face-Extraction 作者: duycao2506 项目源码 文件源码
def extractFeatures(self, img):
        "A vector of 2n elements where n is the number of theta angles"
        "and 2 is the number of frequencies under consideration"
        filters =  self.build_filters(img.shape[0],img.shape[1],5,(0.75,1.5),2,1,np.pi/2.0)
        fft_filters = [np.fft.fft2(i) for i in filters]
        img_fft = np.fft.fft2(img)
        a =  img_fft * fft_filters
        s = [np.fft.ifft2(i) for i in a]
        k = [p.real for p in s]
        return k
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号