当前位置:网站首页>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'.
"""
边栏推荐
- 某公司文件服务器迁移方案
- One dimensional vector transpose point multiplication np dot
- Summary and Reflection on issues related to seq2seq, attention and transformer in hands-on deep learning
- MPSoC QSPI flash upgrade method
- [牛客网刷题 Day4] JZ55 二叉树的深度
- [code practice] [stereo matching series] Classic ad census: (5) scan line optimization
- Codeworks round 638 (Div. 2) cute new problem solution
- Golang foundation - the time data inserted by golang into MySQL is inconsistent with the local time
- RT thread kernel quick start, kernel implementation and application development learning with notes
- c#比较两张图像的差异
猜你喜欢
My university
Summary of "reversal" problem in challenge Programming Competition
My experience from technology to product manager
我从技术到产品经理的几点体会
Halcon shape_ trans
Attention is all you need
Halcon: check of blob analysis_ Blister capsule detection
Rebuild my 3D world [open source] [serialization-1]
Understanding rotation matrix R from the perspective of base transformation
Redis implements a high-performance full-text search engine -- redisearch
随机推荐
Typescript hands-on tutorial, easy to understand
[technical school] spatial accuracy of binocular stereo vision system: accurate quantitative analysis
【日常訓練--騰訊精選50】557. 反轉字符串中的單詞 III
Causes and appropriate analysis of possible errors in seq2seq code of "hands on learning in depth"
牛顿迭代法(解非线性方程)
[daiy4] copy of JZ35 complex linked list
Codeworks round 638 (Div. 2) cute new problem solution
Halcon clolor_ pieces. Hedv: classifier_ Color recognition
Mengxin summary of LCs (longest identical subsequence) topics
JS asynchronous error handling
Codeworks round 639 (Div. 2) cute new problem solution
Illustrated network: what is gateway load balancing protocol GLBP?
[code practice] [stereo matching series] Classic ad census: (6) multi step parallax optimization
Numpy pit: after the addition of dimension (n, 1) and dimension (n,) array, the dimension becomes (n, n)
Meta tag details
Halcon shape_ trans
Install the CPU version of tensorflow+cuda+cudnn (ultra detailed)
Jenkins Pipeline 方法(函数)定义及调用
kubeadm系列-02-kubelet的配置和启动
Use arm neon operation to improve memory copy speed