>>> import scipy
>>> scipy.misc
<module 'scipy.misc' from 'C:\Python27\lib\site-packages\scipy\misc\__init__.pyc'>
>>> scipy.misc.imread('test.tif')
Traceback (most recent call last):
File "<pyshell#11>", line 1, in <module>
scipy.misc.imread('test.tif')
AttributeError: 'module' object has no attribute 'imread'

如题

解法一:在相应环境下安装Pillow,然后导

 pip install Pillow
import scipy.misc

解法二:换一种读取方法

 import imageio
content_image = imageio.imread

读入图片显示scipy.misc module has no attribute imread?的更多相关文章

  1. AttributeError: module 'scipy.misc' has no attribute 'imread'

    运行python程序报错:AttributeError: module 'scipy.misc' has no attribute 'imread' 报错原因1:scipy版本过高 解决方案:降低sc ...

  2. module 'scipy.misc' has no attribute 'toimage',python

    anaconda环境下: 错误:python 命令行运行出错:module 'scipy.misc' has no attribute 'toimage' 解决:打开Anaconda prompt,输 ...

  3. Python报错module 'scipy.misc' has no attribute 'xxx'

    Python报错module 'scipy.misc' has no attribute 'imresize' 解决办法: 安装Pillow包,命令如下: pip install Pillow 然后重 ...

  4. Tensorflow机器学习入门——AttributeError: module 'scipy.misc' has no attribute 'toimage'

    这个bug的解决办法: import cv2 # scipy.misc.toimage(image_array).save('cifar10_data/raw/%d.jpg' % i) cv2.imw ...

  5. scipy笔记—scipy.misc.imresize用法(方便训练图像数据)

    scipy.misc.imresize 不同于普通的reshape, imresize不是单纯的改变图像矩阵的维度,而是能将图片重采样为指定像素,这样给深度学习中训练图像数据带来方便. import ...

  6. Opencv怎么读入,显示,保存图像-OpenCV步步精深

    怎么读入图像呢? 我们用 img = cv2.imread('图像路径\原图像名称',0) 原图像名称要有后缀 .png , .jpg等等原图像带有的后缀. 这里我们着重说明一下图像路径,这个路径一定 ...

  7. mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread'

    mac os 使用 from scipy.misc import imread ImportError: cannot import name 'imread' 问题1: 我原先安装了 pillow ...

  8. 商城06——solr索引库搭建&solr搜索功能实现&图片显示问题解决

    1.   课程计划 1.搜索工程的搭建 2.linux下solr服务的搭建 3.Solrj使用测试 4.把数据库中的数据导入索引库 5.搜索功能的实现 2.   搜索工程搭建 要实现搜索功能,需要搭建 ...

  9. 4.C#WinForm基础图片(显示和隐藏)

    要求: 软件上有一张图片,默认是隐藏的.用户在文本框中输入身份证号(131226198105223452),点击按钮,如果年龄大于18岁,则显示图片. 知识点: 取当前年份,Date Time Now ...

随机推荐

  1. 【SQL】BETWEEN操作符

    BETWEEN 操作符在 WHERE 子句中使用,作用是选取介于两个值之间的数据范围. 操作符 BETWEEN ... AND 会选取介于两个值之间的数据范围.这些值可以是数值.文本或者日期. 注意: ...

  2. QS之force(1)

    force This command allows you to apply stimulus interactively to VHDL signals(not variables), Verilo ...

  3. apicloud 第三方登录授权、微信、扣扣、微博登录授权

    授权登录.接入第三方的配置 例如:微信的登录授权. 首先在模块里面添加 wx 这个模块,然后在项目的配置文件里面进行配置. 配置的时候要现在微信开放平台 https://open.weixin.qq. ...

  4. java将父类所有的属性COPY到子类中

    public class FatherToChildUtils { /* * 将父类所有的属性COPY到子类中. * 类定义中child一定要extends father: * 而且child和fat ...

  5. shell 结合expect实现ssh登录并执行命令

    #!/bin/bash ips=( '127.0.0.1' ) ;i<${#ips[*]};i++)) do expect <<EOF #这里的 expect <<EOF ...

  6. 数据清理,预处理 pandas dataframe 操作技巧 总结

    dsoft2 = data1.loc[(data1['程'] == "轻") | (data1['程'] == "中")]设置x下标plt.xticks(np. ...

  7. spotlight on mysql 监控

    . 安装 下载地址:https://pan.baidu.com/s/1qYi3lec 官网地址——https://www.quest.com/common/registration.aspx?requ ...

  8. 使用VirtualBox实现端口转发,以SSH与Django为例

    先来认识几个概念 (1)IP地址:又称为互联网协议地址,是计算机的物理地址,相当于计算机的编号,是32位的二进制数,通常被分割成4个8位的二进制数: (2)端口:指设备与外界通讯的接口,一台计算机的端 ...

  9. NLTK学习笔记(二):文本、语料资源和WordNet汇总

    目录 语料库基本函数表 文本语料库分类 常见语料库及其用法 载入自定义语料库 词典资源 停用词语料库 WordNet面向语义的英语字典 语义相似度 语料库基本函数表 示例 描述 fileids() 语 ...

  10. 【Codeforces Round #519 by Botan Investments A】 Elections

    [链接] 我是链接,点我呀:) [题意] [题解] 枚举k 那么另外一个人的得票就是nk-sum(ai) 找到最小的满足nk-sum(ai)>sum(ai)的k就ok了 [代码] #includ ...