当前位置:网站首页>Opencv display image
Opencv display image
2022-06-23 05:41:00 【andrew P】
One . use opencv Read the picture , use matplotlib.pyplot Show
1.opencv The read image channel is ,BGR, If you use matplotlib Show , It's about to turn into RGB
import matplotlib.pyplot as plt
import cv2
def CVshow_RGB(path):
img = cv2.imread(path)
img = img[:, :, [2, 1, 0]]#BGR to RGB
plt.title("RGB")
plt.imshow(img)
plt.show()2. If there is batch , You need to compress the batch dimension
def CVshow_pixes(title,img_pixes):
if len(img_pixes.shape)!=3 :
img_pixes=np.squeeze(img_pixes,axis=0)
cv2.imshow(title,img_pixes)
cv2.waitKey()
cv2.destroyAllWindows()Two . use opencv Read the picture , use opencv Show
边栏推荐
- MySQL面试真题(二十五)——常见的分组比较场景
- STM32 clock tree misconfiguration causes boot to enter hard interrupt
- 啊哈C语言 第8章 游戏时间到了(第29讲)
- Stm32cube serial port uses dma+idle to receive variable length data
- What do Niu B programmers pay attention to when "creating an index"?
- Oracle异常
- How to move the software downloaded from win11 app store to the desktop
- Three implementation methods: left fixed and right adaptive (Flex, float + BFC, float margin left)
- C prime plus notes d'apprentissage - 2, constantes et formatage io (I / o)
- Redis缓存穿透解决方案-布隆过滤器
猜你喜欢

云原生架构(04)-CNCF

MySQL面试真题(二十二)——表连接后的条件筛选及分组筛选

What do Niu B programmers pay attention to when "creating an index"?

制造业数字化转型存在问题及原因分析

MCS: continuous random variable - student's t distribution

Introduction to MySQL (I) grammar

数字化工厂建设可划分为三个方面

Facing new challenges and becoming a better self -- an advanced technology er

云原生数据库是未来数据库的天下

sprintf 格式代码使用不规范在不同平台下的表现
随机推荐
Mobile phone wireless charging dual coil 15W scheme SOC IC ip6809
MCS: continuous random variable chi square distribution
制造业数字化转型存在问题及原因分析
MySQL Foundation
GO语言-panic和recover
Win11不能录制音频怎么办?Win11无法录入声音的解决方法
B-string value (string DP) of the 16th Northeast College Students' Programming Competition (warm-up)
MySQL面试真题(二十五)——常见的分组比较场景
Composite API
Common wireless charging and transmitting IC chips
Win11 app store keeps turning around solution
数学分析_笔记_第1章:集合与映射
MySQL面试真题(三十)——贝壳-房产订单分析
About replay attack and defense
WebRTC[47] - WebRTC 保存 YUV 数据的常用方式
LeetCode-1757. Recyclable and low-fat products_ SQL
Jenkins installs and deploys and automatically builds and publishes jar applications
数字化工厂建设可划分为三个方面
What is the reason for the black screen of the computer monitor when the computer is turned on? What should I do about the black screen of the computer monitor
1010 Radix