testing_emo.py 文件源码

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

项目:Vision-Based-Age-Estimation 作者: parthapritam2717 项目源码 文件源码
def calculatehistogram(self, image, eps=1e-7):
        lbp = feature.local_binary_pattern(image, self.numberOfPoints, self.radius, method="uniform")
        (histogram, _) = np.histogram(lbp.ravel(),
                                      bins=np.arange(0, self.numberOfPoints + 3),
                                      range=(0, self.numberOfPoints + 2))
        # now we need to normalise the histogram so that the total sum=1
        histogram = histogram.astype("float")
        histogram /= (histogram.sum() + eps)
        return histogram
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号