Title
2020
摘要: import cv2import numpy as npfrom imutils import contoursdef cv_show(img,img_name): cv2.imshow(img_name,img) cv2.waitKey(0) cv2.destroyAllWindows()#第一步 阅读全文
posted @ 2021-08-11 14:15 俗了清风 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 1.高斯模糊:去噪音点 img = cv2.GaussianBlur(img, kernel_size, sigma) 2.边缘检测: edge = cv2.Canny(image, threshold1, threshold2[, edges[, apertureSize[, L2gradient 阅读全文
posted @ 2021-08-10 17:50 俗了清风 阅读(55) 评论(0) 推荐(0) 编辑
摘要: dst = cv2.Sobel(src, ddepth, dx, dy[, dst[, ksize[, scale[, delta[, borderType]]]]]) 参数: 前四个是必须的参数: 1. src - 需要处理的图像 2. ddepth - 图像的深度,-1表示采用的是与原图像相同的 阅读全文
posted @ 2021-08-06 17:02 俗了清风 阅读(684) 评论(0) 推荐(0) 编辑
摘要: cv2.Canny(src,min,max) contours,hierarchy=cv2.findCountours(img,mode,method) #由于opencv版本原因,返回值由三个值(binary,contours,hierarchy)变成两个值 mode:轮廓检索模式 RETR_EX 阅读全文
posted @ 2021-08-03 17:55 俗了清风 阅读(599) 评论(0) 推荐(0) 编辑
摘要: ret,dst = cv2.threshhold(src,thresh,maxval,type) src: 输入图,只能输入单通道图像,通常为灰度值 dst:输出图 thresh:阈值 maxval:当像素值超过了阈值(或者小于阈值,根据type来决定),所赋予的值 type:二值化操作类型,包含 阅读全文
posted @ 2021-07-28 13:46 俗了清风 阅读(228) 评论(0) 推荐(0) 编辑
摘要: import cv2import matplotlib.pyplot as pltimport numpy as np#flower=cv2.imread('flower.jpg',cv2.IMREAD_GRAYSCALE)flower = cv2.imread('flower.jpg') #边界填 阅读全文
posted @ 2021-07-28 11:59 俗了清风 阅读(279) 评论(0) 推荐(0) 编辑
摘要: np.concatenate(a,b,axes=0 or 1) a,b 数组拼接 np.prod(a,b,axes=0 or 1) a,b 相乘 np.diff(a,n=1,axis =-1) 阅读全文
posted @ 2021-07-13 16:56 俗了清风 阅读(856) 评论(0) 推荐(0) 编辑
摘要: shift + F6 改文件名或变量名 (该文件名也可以右键选择Open In ——Explorer) Ctrl + 空格 跳出可能的方法提示 shift + F10 执行 Ctrl + Alt + S 设置(settings)界面 (界面主题风格,字体,语言,插件,解释器设置都在这) Ctrl + 阅读全文
posted @ 2021-07-02 11:16 俗了清风 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 借鉴,来当做复习用! 阅读全文
posted @ 2021-05-12 20:07 俗了清风 阅读(46) 评论(0) 推荐(0) 编辑
摘要: CUDA driver version is insufficient for CUDA runtime version CUDA driver version(驱动版本):就是NVIDIA GPU的驱动程序版本; 查看命令:nvidia-smi CUDA runtime version(运行时版本 阅读全文
posted @ 2021-04-23 20:56 俗了清风 阅读(92) 评论(0) 推荐(0) 编辑
Title