cpm_utils.py 文件源码

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

项目:convolutional-pose-machines-tensorflow 作者: timctho 项目源码 文件源码
def make_gaussian(size, fwhm=3, center=None):
    """ Make a square gaussian kernel.
    size is the length of a side of the square
    fwhm is full-width-half-maximum, which
    can be thought of as an effective radius.
    """

    x = np.arange(0, size, 1, float)
    y = x[:, np.newaxis]

    if center is None:
        x0 = y0 = size // 2
    else:
        x0 = center[0]
        y0 = center[1]

    return np.exp(-((x - x0) ** 2 + (y - y0) ** 2) / 2.0 / fwhm / fwhm)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号