- 博客(3)
- 资源 (2)
- 收藏
- 关注
原创 python cv2 基础操作 opencv
读取图片import cv2img = cv2.imread('image_path')显示图片import cv2img = cv2.imread('image_path')cv2.imshow('name',img)cv2.waitKey()cv2.destroyAllWindows()图像形状import cv2img = cv2.imread('image_path')img.shape图像分割,通道拆分import cv2img = cv2.imread('
2021-10-30 10:36:41
1391
原创 matpotlib 画子图
最简单方式创建子图import numpy as npfrom matplotlib import pyplot as pltnp.random.seed(123456)# 随机生成1-20的随机数x = np.random.randint(1, 20, 20)xmax = x.max()xmin = x.min()xmax, xmin# 数据缩放到0-1的 区间xx = (x - xmin) / (xmax - xmin)# 2,1,1, 代表 画子图 2行1列第一 个位置#
2021-10-30 10:34:16
216
原创 python with用法
with用法和原理:class Sample: def __enter__(self): print("In __enter__()") return "Foo" def __exit__(self, type, value, trace): print("In __exit__()")def get_sample(): return Sample()with get_sample() as sample: print (
2021-10-30 10:31:58
90
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人