当前位置:网站首页>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'.
"""边栏推荐
- Count of C # LINQ source code analysis
- c#比较两张图像的差异
- Multiple linear regression (gradient descent method)
- Multiple linear regression (sklearn method)
- The location search property gets the login user name
- [technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
- 编辑器-vi、vim的使用
- Golang foundation - the time data inserted by golang into MySQL is inconsistent with the local time
- 交通运输部、教育部:广泛开展水上交通安全宣传和防溺水安全提醒
- kubeadm系列-02-kubelet的配置和启动
猜你喜欢

什么是防火墙?防火墙基础知识讲解
![[牛客网刷题 Day4] JZ55 二叉树的深度](/img/f7/ca8ad43b8d9bf13df949b2f00f6d6c.png)
[牛客网刷题 Day4] JZ55 二叉树的深度

Confusing basic concepts member variables local variables global variables

It cold knowledge (updating ing~)

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

Introduction Guide to stereo vision (2): key matrix (essential matrix, basic matrix, homography matrix)
![[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis](/img/59/823b587566f812c76e0e4dee486674.jpg)
[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis

Wechat H5 official account to get openid climbing account
![[matlab] matlab reads and writes Excel](/img/80/78e4c7fcd27473526e480d4b930e2c.jpg)
[matlab] matlab reads and writes Excel
![Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]](/img/ed/0483c529db2af5b16b18e43713d1d8.jpg)
Introduction Guide to stereo vision (4): DLT direct linear transformation of camera calibration [recommended collection]
随机推荐
Causes and appropriate analysis of possible errors in seq2seq code of "hands on learning in depth"
12、动态链接库,dll
2011-11-21 training record personal training (III)
Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
My experience from technology to product manager
Task failed task_ 1641530057069_ 0002_ m_ 000000
Programming implementation of ROS learning 6 -service node
Programming implementation of subscriber node of ROS learning 3 subscriber
[牛客网刷题 Day4] JZ35 复杂链表的复制
Blue Bridge Cup provincial match simulation question 9 (MST)
kubeadm系列-00-overview
Solution to the problem of the 10th Programming Competition (synchronized competition) of Harbin University of technology "Colin Minglun Cup"
Ecmascript6 introduction and environment construction
Codeworks round 681 (Div. 2) supplement
Codeworks round 638 (Div. 2) cute new problem solution
Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
It cold knowledge (updating ing~)
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
[牛客网刷题 Day4] JZ32 从上往下打印二叉树
Introduction Guide to stereo vision (5): dual camera calibration [no more collection, I charge ~]