解决python opencv无法显示图片的问题
作者:ftstic 时间:2021-09-11 13:26:37
结合网上解决方法,总结了一下
注意三点:
1.文件名或路径名开头如果会引起转义,则\要替换为\\
2.文件不能放在桌面,因为读取时按中文路径
3.运行后未响应,原因还没有查明,在下一行 cv.waitKey(0)解决
import cv2 as cv
img = cv.imread("D:\\python_file\ae.jpg")
cv.imshow("image",img)
#cv.waitKey(0)
来源:https://blog.csdn.net/ftstic/article/details/79300753
标签:python,opencv,图片
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
MYSQL教程:保证安全的备份MYSQL数据库的方法
2010-03-03 17:12:00
pyecharts实现数据可视化
2023-05-24 06:18:48
![](https://img.aspxhome.com/file/2023/9/114509_0s.png)
python中pdb模块实例用法
2023-10-14 19:04:48
Python3使用PyQt5制作简单的画板/手写板实例
2022-01-11 15:21:30
![](https://img.aspxhome.com/file/2023/3/117313_0s.png)
Python中关于面向对象私有属性方法的详细讲解
2022-11-29 05:38:36
![](https://img.aspxhome.com/file/2023/8/96988_0s.png)
python基础学习之组织文件
2022-04-08 21:47:23
![](https://img.aspxhome.com/file/2023/0/127910_0s.png)
python实现可逆简单的加密算法
2023-08-02 04:00:31
![](https://img.aspxhome.com/file/2023/7/92467_0s.png)
Python实现新年愿望代码雨效果
2022-08-02 00:52:35
![](https://img.aspxhome.com/file/2023/6/72186_0s.jpg)
使用Python三角函数公式计算三角形的夹角案例
2022-12-06 04:09:33
PyCharm+Miniconda3安装配置教程详解
2022-03-26 08:31:16
![](https://img.aspxhome.com/file/2023/7/79627_0s.png)
Python+Opencv实现表格边框线检测
2023-08-11 04:55:14
![](https://img.aspxhome.com/file/2023/1/61971_0s.png)
python+opencv实现文字颜色识别与标定功能
2023-09-05 02:25:27
![](https://img.aspxhome.com/file/2023/2/110012_0s.png)
对Python+opencv将图片生成视频的实例详解
2022-01-03 08:42:16
使用Selenium实现微博爬虫(预登录、展开全文、翻页)
2022-07-09 11:00:18
![](https://img.aspxhome.com/file/2023/2/107562_0s.jpg)
php去掉数组的第一个值的两个函数:array_shift、array_splice
2023-05-29 02:26:07
10个最容易犯的HTML标签错误
2010-09-13 12:37:00
![](https://img.aspxhome.com/file/UploadPic/20109/13/01-23s.jpg)
基于JS判断iframe是否加载成功的方法(多种浏览器)
2023-08-24 04:14:52
使用python进行拆分大文件的方法
2022-06-23 17:54:04
![](https://img.aspxhome.com/file/2023/5/70815_0s.jpg)
显卡驱动CUDA 和 pytorch CUDA 之间的区别
2021-12-29 04:35:31
![](https://img.aspxhome.com/file/2023/3/78753_0s.png)
Python运算符之Inplace运算符的使用教程
2021-09-24 11:32:10