from scipy import misc 读取和保存图片
发布日期:2021-06-29 11:45:57 浏览次数:3 分类:技术文章

本文共 602 字,大约阅读时间需要 2 分钟。

from scipy  import misc

def imread(name, flatten=False, mode=None)    pass"""读取一张图片返回array,uint8,"""def imsave(name, arr, format=None):    pass"""Save an array as an image. 自动的调用将图片转成0-255范围内的arr : ndarray, MxN or MxNx3 or MxNx4        Array containing image values.  If the shape is ``MxN``, the array        represents a grey-level image.  Shape ``MxNx3`` stores the red, green        and blue bands along the last dimension.  An alpha layer may be        included, specified as the last colour band of an ``MxNx4`` array."""

注意上面对图片读取和保存的函数会被弃用,使用如下代替:

import imageioimageio.imread()imageio.imwrite()

 

转载地址:https://blog.csdn.net/zz2230633069/article/details/93534361 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:关于Batch Normalization
下一篇:cv2.imread(fp)读取图片,得到的是BGR颜色空间的numpy类型,uint8类型

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年05月01日 06时12分36秒