当前位置:网站首页>skimage: imread & imsave & imshow
skimage: imread & imsave & imshow
2022-07-05 00:26:00 【harry_ tea】
imread & imsave & imshow
install
scikit-image Official website :https://scikit-image.org/docs/dev/api/skimage.measure.html
install :pip install scikit-image
Read and write operations
Be careful cv2 The read and write types of are np.array、uint8、255、HWC、RGB
1. imread
io.imread(filename)
- filename: The path to read the file
- as_gray: If you read RGB chart , take RGB Turn into Gray, If it is Gray It does not change ,default=False
Load a picture
Loads an image from a file.
The return property is np.array
、uint8
、255
、HWC
、RBG
Code example
from skimage import io
img_color = io.imread('color.jpg')
# img_color2gray = io.imread('color.jpg', as_gray=True)
img_gray = cv2.imread('gray.jpg')
2. imsave
io.imwrite(filename, img)
- filename: Path to store
- im: Saved pictures
Save the picture to a specific path filename
Saves an image to a specified file.
Be similar to imread Mirror operation of , What type is read in , What type is it when saving np.array
、uint8
、255
、HWC
、RGB
Code example
from skimage import io
img1 = io.imread('color.jpg')
io.imwrite("color2.jpg", img1)
3. imshow
io.imshow(image)
- image: Pictures shown
Show the picture to a specific window
Displays an image in the specified window.
image type np.array
、uint8
、255
、HWC
、RGB
It's also easy to use
from imageio import io
img1 = io.imread('color.jpg')
io.imshow("color", img1)
io.show()
边栏推荐
- JS how to realize array to tree
- [monitoring] ZABBIX
- What is the difference between port mapping and port forwarding
- Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
- Face recognition 5- insight face padding code practice notes
- 快解析——好用的内网安全软件
- Business implementation - the log is written to the same row of data
- 图解网络:什么是网关负载均衡协议GLBP?
- go踩坑——no required module provides package : go.mod file not found in current directory or any parent
- A new method for analyzing the trend chart of London Silver
猜你喜欢
如何有效对直流列头柜进行监测
[paper reading] Tun det: a novel network for meridian ultra sound nodule detection
分布式BASE理论
[IELTS reading] Wang Xiwei reading P3 (heading)
URL和URI
快解析——好用的内网安全软件
Some basic functions of enterprise projects are developed, and important things are saved to online first a
js如何实现数组转树
How to do the project of computer remote company in foreign Internet?
Fs8b711s14 electric wine bottle opener MCU IC scheme development special integrated IC
随机推荐
2022.07.03(LC_6109_知道秘密的人数)
公司要上监控,Zabbix 和 Prometheus 怎么选?这么选准没错!
Summary of week 22-07-02
How many triangles are there in the golden K-line diagram?
如果炒股开华泰证券的户,在网上开户安全吗?
【路径规划】RRT增加动力模型进行轨迹规划
The waterfall flow layout demo2 (method 2) used by the uniapp wechat applet (copy and paste can be used without other processing)
海思3559万能平台搭建:YUV422的踩坑记录
Basic points of the game setup of the points mall
Continuous modification of business scenario functions
Five papers recommended for the new development of convolutional neural network in deep learning
GDB common commands
[IELTS reading] Wang Xiwei reading P4 (matching1)
go踩坑——no required module provides package : go.mod file not found in current directory or any parent
TS quick start - functions
P4408 [NOI2003] 逃学的小孩(树的直径)
[Peking University] tensorflow2.0-1-opening
P4281 [ahoi2008] emergency assembly / gathering (LCA)
[paper reading] Tun det: a novel network for meridian ultra sound nodule detection
js如何实现数组转树