pyfrp_img_module.py 文件源码

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

项目:PyFRAP 作者: alexblaessle 项目源码 文件源码
def loadImg(fn,enc,dtype='float'):

    """Loads image from filename fn with encoding enc and returns it as with given dtype.

    Args:
        fn (str): File path.
        enc (str): Image encoding, e.g. 'uint16'.

    Keyword Args:
        dtype (str): Datatype of pixels of returned image.

    Returns:
        numpy.ndarray: Loaded image.
    """

    #Load image
    img = skimage.io.imread(fn).astype(enc)

    #Getting img values
    img=img.real
    img=img.astype(dtype)

    return img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号