随笔分类 -  opencv

摘要:import cv2 as cv import numpy as np def clamp(x): if x >255: return 255 if x <0 : return 0 return x def gussian_noise(image): h, w, c = image.shape[:3 阅读全文
posted @ 2020-02-11 19:56 地球上最后一个直男 阅读(577) 评论(0) 推荐(0)
摘要:均值模糊 中值模糊 自定义模糊 import cv2 as cv import numpy as np def blur_demo(image): dst = cv.blur(image, ksize=(3, 3)) cv.imshow("dst", dst) cv.imshow("src", sr 阅读全文
posted @ 2020-02-10 20:17 地球上最后一个直男 阅读(217) 评论(0) 推荐(0)
摘要:#泛洪填充 import cv2 as cv import numpy as np def fillblooding_demo(image): h, w = image.shape[:2] image_copy = image.copy() mask = np.zeros(shape=(h+2, w 阅读全文
posted @ 2020-02-10 19:01 地球上最后一个直男 阅读(419) 评论(0) 推荐(0)
摘要:链接:https://blog.csdn.net/qq_29796317/article/details/72425556 阅读全文
posted @ 2020-02-10 16:23 地球上最后一个直男 阅读(165) 评论(0) 推荐(0)
摘要:加减乘除不说了,反正就是两幅相同的图片运用cv.add(), cv.substract(),cv.multiply(), cv.divide()等实现 逻辑运算就是cv.bitewise_and(),cv.bitewise_or()等等 #调节亮度 import cv2 as cv import n 阅读全文
posted @ 2020-02-10 10:25 地球上最后一个直男 阅读(513) 评论(0) 推荐(0)
摘要:import cv2 as cv import numpy as np def video_demo(): capture = cv.VideoCapture("d:/two.mp4") low_array = np.array([26, 43, 46]) up_array = np.array([ 阅读全文
posted @ 2020-02-07 00:52 地球上最后一个直男 阅读(169) 评论(0) 推荐(0)
摘要:1.遍历图像对其每个像素取反 import cv2 as cv import numpy as np img = cv.imread("d:/girl.jfif") cv.imshow("img", img) height = img.shape[0] width = img.shape[1] ch 阅读全文
posted @ 2020-02-06 22:58 地球上最后一个直男 阅读(443) 评论(0) 推荐(0)
摘要:import cv2 import numpy as np img = cv2.imread("C:/Users/93917/Pictures/Screenshots/one.png") cv2.imshow("Image", img) cv2.waitKey(0) cv2.destroyAllWi 阅读全文
posted @ 2020-02-06 20:27 地球上最后一个直男 阅读(834) 评论(0) 推荐(0)