当前位置:网站首页>scipy. misc. imread()
scipy. misc. imread()
2022-07-05 08:58:00 【Wanderer001】
Reference resources scipy.misc.imread() - cloud + Community - Tencent cloud
import scipy.misc
b=scipy.misc.imread('/home/zzp/2.jpg')scipy.misc.imread(name, flatten=False, mode=None)read a image from a file as an array Read the picture as array type , namely numpy type
Parameters :
- name : str or file object. The file name or file object to be read.
- flatten : bool, optional. If True, flattens the color layers into a single gray-scale layer.
- mode : str, optional. Mode to convert image to, e.g. ``'RGB'``. See the Notes for more details.
Return value :
- imread : ndarray. The array obtained by reading the image.
mode Details :
`imread` uses the Python Imaging Library (PIL) to read an image.
The following notes are from the PIL documentation.
"""
Notes
-----
`imread` uses the Python Imaging Library (PIL) to read an image.
The following notes are from the PIL documentation.
`mode` can be one of the following strings:
* 'L' (8-bit pixels, black and white)
* 'P' (8-bit pixels, mapped to any other mode using a color palette)
* 'RGB' (3x8-bit pixels, true color)
* 'RGBA' (4x8-bit pixels, true color with transparency mask)
* 'CMYK' (4x8-bit pixels, color separation)
* 'YCbCr' (3x8-bit pixels, color video format)
* 'I' (32-bit signed integer pixels)
* 'F' (32-bit floating point pixels)
PIL also provides limited support for a few special modes, including
'LA' ('L' with alpha), 'RGBX' (true color with padding) and 'RGBa'
(true color with premultiplied alpha).
When translating a color image to black and white (mode 'L', 'I' or
'F'), the library uses the ITU-R 601-2 luma transform::
L = R * 299/1000 + G * 587/1000 + B * 114/1000
When `flatten` is True, the image is converted using mode 'F'.
When `mode` is not None and `flatten` is True, the image is first
converted according to `mode`, and the result is then flattened using
mode 'F'.
"""边栏推荐
- The location search property gets the login user name
- Ros-11 common visualization tools
- 什么是防火墙?防火墙基础知识讲解
- Redis实现高性能的全文搜索引擎---RediSearch
- RT-Thread内核快速入门,内核实现与应用开发学习随笔记
- Wechat H5 official account to get openid climbing account
- Halcon clolor_ pieces. Hedv: classifier_ Color recognition
- Array, date, string object method
- C [essential skills] use of configurationmanager class (use of file app.config)
- MPSoC QSPI Flash 升级办法
猜你喜欢
![[牛客网刷题 Day4] JZ55 二叉树的深度](/img/f7/ca8ad43b8d9bf13df949b2f00f6d6c.png)
[牛客网刷题 Day4] JZ55 二叉树的深度

容易混淆的基本概念 成员变量 局部变量 全局变量

C#【必备技能篇】ConfigurationManager 类的使用(文件App.config的使用)

My experience from technology to product manager

ROS learning 4 custom message

优先级队列(堆)
![[matlab] matlab reads and writes Excel](/img/80/78e4c7fcd27473526e480d4b930e2c.jpg)
[matlab] matlab reads and writes Excel

IT冷知识(更新ing~)

Blogger article navigation (classified, real-time update, permanent top)

Programming implementation of ROS learning 5-client node
随机推荐
驾驶证体检医院(114---2 挂对应的医院司机体检)
[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
Array,Date,String 对象方法
2011-11-21 training record personal training (III)
3D reconstruction open source code summary [keep updated]
nodejs_ fs. writeFile
Use arm neon operation to improve memory copy speed
Introduction Guide to stereo vision (2): key matrix (essential matrix, basic matrix, homography matrix)
[牛客网刷题 Day4] JZ55 二叉树的深度
Array, date, string object method
使用arm Neon操作,提高内存拷贝速度
Luo Gu p3177 tree coloring [deeply understand the cycle sequence of knapsack on tree]
Return of missing persons
Blogger article navigation (classified, real-time update, permanent top)
Mengxin summary of LCs (longest identical subsequence) topics
OpenFeign
[daiy4] jz32 print binary tree from top to bottom
容易混淆的基本概念 成员变量 局部变量 全局变量
Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
Ros-10 roslaunch summary