当前位置:网站首页>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'.
"""边栏推荐
- scipy.misc.imread()
- Introduction Guide to stereo vision (2): key matrix (essential matrix, basic matrix, homography matrix)
- nodejs_ fs. writeFile
- 一题多解,ASP.NET Core应用启动初始化的N种方案[上篇]
- 520 diamond Championship 7-4 7-7 solution
- Configuration and startup of kubedm series-02-kubelet
- uni-app 实现全局变量
- Programming implementation of subscriber node of ROS learning 3 subscriber
- Dynamic dimensions required for input: input, but no shapes were provided. Automatically overriding
- Confusing basic concepts member variables local variables global variables
猜你喜欢

Confusing basic concepts member variables local variables global variables

nodejs_ fs. writeFile

Halcon blob analysis (ball.hdev)
![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 ~]

Redis implements a high-performance full-text search engine -- redisearch
![[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation](/img/d8/7291a5b14160600ba73810e6dd1eb5.jpg)
[code practice] [stereo matching series] Classic ad census: (4) cross domain cost aggregation

2020 "Lenovo Cup" National College programming online Invitational Competition and the third Shanghai University of technology programming competition

什么是防火墙?防火墙基础知识讲解
![[matlab] matlab reads and writes Excel](/img/80/78e4c7fcd27473526e480d4b930e2c.jpg)
[matlab] matlab reads and writes Excel

Halcon: check of blob analysis_ Blister capsule detection
随机推荐
Luo Gu p3177 tree coloring [deeply understand the cycle sequence of knapsack on tree]
混淆矩阵(Confusion Matrix)
资源变现小程序添加折扣充值和折扣影票插件
Latex improve
Blogger article navigation (classified, real-time update, permanent top)
asp. Net (c)
Programming implementation of subscriber node of ROS learning 3 subscriber
迁移学习和域自适应
Array,Date,String 对象方法
深度学习模型与湿实验的结合,有望用于代谢通量分析
皮尔森相关系数
Codeforces Round #648 (Div. 2) D. Solve The Maze
12、动态链接库,dll
Oracle advanced (III) detailed explanation of data dictionary
My university
某公司文件服务器迁移方案
Warning: retrying occurs during PIP installation
uni-app 实现全局变量
2011-11-21 training record personal training (III)
Tips 1: Web video playback code