当前位置:网站首页>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'.
"""边栏推荐
- Basic number theory - fast power
- Huber Loss
- location search 属性获取登录用户名
- ECMAScript6介绍及环境搭建
- Halcon snap, get the area and position of coins
- notepad++
- Mathematical modeling: factor analysis
- C#图像差异对比:图像相减(指针法、高速)
- RT thread kernel quick start, kernel implementation and application development learning with notes
- [code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
猜你喜欢

C#【必备技能篇】ConfigurationManager 类的使用(文件App.config的使用)
![Rebuild my 3D world [open source] [serialization-1]](/img/74/b6253845b43bc18f425d57695fba7c.jpg)
Rebuild my 3D world [open source] [serialization-1]

混淆矩阵(Confusion Matrix)

Confusing basic concepts member variables local variables global variables

Halcon affine transformations to regions

什么是防火墙?防火墙基础知识讲解
![[daiy4] copy of JZ35 complex linked list](/img/bc/ce90bb3cb6f52605255f1d6d6894b0.png)
[daiy4] copy of JZ35 complex linked list

RT thread kernel quick start, kernel implementation and application development learning with notes

Beautiful soup parsing and extracting data

Programming implementation of ROS learning 6 -service node
随机推荐
Shift operation of complement
MPSoC QSPI flash upgrade method
.NET服务治理之限流中间件-FireflySoft.RateLimit
Introduction Guide to stereo vision (6): level constraints and polar correction of fusiello method
Codeworks round 639 (Div. 2) cute new problem solution
[daily training -- Tencent selected 50] 557 Reverse word III in string
优先级队列(堆)
Halcon shape_ trans
Configuration and startup of kubedm series-02-kubelet
容易混淆的基本概念 成员变量 局部变量 全局变量
嗨 FUN 一夏,与 StarRocks 一起玩转 SQL Planner!
Ros-11 common visualization tools
迁移学习和域自适应
asp. Net (c)
Wechat H5 official account to get openid climbing account
TF coordinate transformation of common components of ros-9 ROS
np.allclose
Characteristic Engineering
Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
C#图像差异对比:图像相减(指针法、高速)