当前位置:网站首页>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'.
"""
边栏推荐
- Halcon Chinese character recognition
- [matlab] matlab reads and writes Excel
- Blue Bridge Cup provincial match simulation question 9 (MST)
- golang 基础 ——map、数组、切片 存放不同类型的数据
- .NET服务治理之限流中间件-FireflySoft.RateLimit
- Infix expression evaluation
- 生成对抗网络
- kubeadm系列-02-kubelet的配置和启动
- Meta tag details
- Illustrated network: what is gateway load balancing protocol GLBP?
猜你喜欢
Mathematical modeling: factor analysis
[Niuke brush questions day4] jz55 depth of binary tree
Beautiful soup parsing and extracting data
My university
Programming implementation of ROS learning 5-client node
优先级队列(堆)
Solution to the problems of the 17th Zhejiang University City College Program Design Competition (synchronized competition)
Ros- learn basic knowledge of 0 ROS - nodes, running ROS nodes, topics, services, etc
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
RT thread kernel quick start, kernel implementation and application development learning with notes
随机推荐
[formation quotidienne - Tencent Selection 50] 557. Inverser le mot III dans la chaîne
Array,Date,String 对象方法
[daily training -- Tencent selected 50] 557 Reverse word III in string
Codeforces Round #648 (Div. 2) D. Solve The Maze
Mengxin summary of LCs (longest identical subsequence) topics
Warning: retrying occurs during PIP installation
TF coordinate transformation of common components of ros-9 ROS
[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation
3D reconstruction open source code summary [keep updated]
LLVM之父Chris Lattner:为什么我们要重建AI基础设施软件
Programming implementation of ROS learning 2 publisher node
Latex improve
Halcon Chinese character recognition
某公司文件服务器迁移方案
Halcon: check of blob analysis_ Blister capsule detection
My experience from technology to product manager
[Niuke brush questions day4] jz55 depth of binary tree
混淆矩阵(Confusion Matrix)
One dimensional vector transpose point multiplication np dot
Basic number theory - fast power