python - 如何在python中删除图像上的网格线?
问题描述
我正在为我的项目使用 google colab。即使我没有写它们,我也会在图像上得到网格线。
from matplotlib import pyplot as plt
%matplotlib inline
import cv2
img = cv2.imread('k15.jpg')
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
plt.imshow(img)
对于上面的代码,我得到了网格线,当我在我的 python shell 中运行相同的代码时,情况并非如此。
解决方案
plt.imshow(myImage)
plt.grid(None) <---- this should remove that white grid
推荐阅读
- r - 在 scatterplot3d 中划分颜色
- django - 哪种Django模型关系合适?
- c# - 调用 Sub Orchestrator 时不要等待 - Azure Durable Functions
- python - Django:管理界面:如何更改用户密码
- r - 如何在 R 中的特定列中添加逗号和百分号
- java - 通过 liquibase 创建数据库结构并从 data-h2.sql 文件中插入模拟数据
- c# - 自定义 RadioButton 框架,里面有文本
- mips - MARS 上的 Mips 汇编语言
- python - 在 Pyspark 中读取和保存图像文件
- sql - PostgreSQL - 如何在条件后连接行值