positionToIntensityUncertainty.py 文件源码

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

项目:imgProcessor 作者: radjkarl 项目源码 文件源码
def positionToIntensityUncertaintyForPxGroup(image, std, y0, y1, x0, x1):
    '''
    like positionToIntensityUncertainty
    but calculated average uncertainty for an area [y0:y1,x0:x1]
    '''
    fy, fx = y1 - y0, x1 - x0
    if fy != fx:
        raise Exception('averaged area need to be square ATM')
    image = _coarsenImage(image, fx)
    k = _kSizeFromStd(std)
    y0 = int(round(y0 / fy))
    x0 = int(round(x0 / fx))
    arr = image[y0 - k:y0 + k, x0 - k:x0 + k]
    U = positionToIntensityUncertainty(arr, std / fx, std / fx)
    return U[k:-k, k:-k]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号