当前位置:网站首页>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'.
"""边栏推荐
- 皮尔森相关系数
- Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]
- Rebuild my 3D world [open source] [serialization-1]
- Luo Gu p3177 tree coloring [deeply understand the cycle sequence of knapsack on tree]
- 12. Dynamic link library, DLL
- ORACLE进阶(三)数据字典详解
- Causes and appropriate analysis of possible errors in seq2seq code of "hands on learning in depth"
- 微信H5公众号获取openid爬坑记
- OpenFeign
- Shift operation of complement
猜你喜欢
![3D reconstruction open source code summary [keep updated]](/img/ec/984aede7ef9e758abd52fb5ff4e144.jpg)
3D reconstruction open source code summary [keep updated]
![Introduction Guide to stereo vision (5): dual camera calibration [no more collection, I charge ~]](/img/68/6bfa390b0bedcdbc4afba2f9bd9c0f.jpg)
Introduction Guide to stereo vision (5): dual camera calibration [no more collection, I charge ~]
![[beauty of algebra] singular value decomposition (SVD) and its application to linear least squares solution ax=b](/img/ee/8e07e2dd89bed63ff44400fe1864a9.jpg)
[beauty of algebra] singular value decomposition (SVD) and its application to linear least squares solution ax=b

深度学习模型与湿实验的结合,有望用于代谢通量分析

Programming implementation of ROS learning 5-client node

Programming implementation of ROS learning 6 -service node

Halcon color recognition_ fuses. hdev:classify fuses by color

Halcon blob analysis (ball.hdev)

Digital analog 1: linear programming

Ros- learn basic knowledge of 0 ROS - nodes, running ROS nodes, topics, services, etc
随机推荐
[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation
Programming implementation of ROS learning 5-client node
使用arm Neon操作,提高内存拷贝速度
Ros- learn basic knowledge of 0 ROS - nodes, running ROS nodes, topics, services, etc
Confusing basic concepts member variables local variables global variables
Wechat H5 official account to get openid climbing account
多元线性回归(sklearn法)
js异步错误处理
JS asynchronous error handling
[牛客网刷题 Day4] JZ35 复杂链表的复制
驾驶证体检医院(114---2 挂对应的医院司机体检)
嗨 FUN 一夏,与 StarRocks 一起玩转 SQL Planner!
Digital analog 2: integer programming
牛顿迭代法(解非线性方程)
Latex improve
微信H5公众号获取openid爬坑记
Basic number theory - factors
Use and programming method of ros-8 parameters
优先级队列(堆)
Blue Bridge Cup provincial match simulation question 9 (MST)