美文网首页
opencv python版-lesson 16

opencv python版-lesson 16

作者: writ | 来源:发表于2019-10-17 20:49 被阅读0次

    均值滤波,高斯滤波,双边滤波

    # -*- coding: utf-8 -*-
    import cv2
    import numpy as np
    import matplotlib.pyplot as mp
    
    img = cv2.imread('opencv.jpg')
    
    blur = cv2.blur(img,(50,50))
    gaussian_blur = cv2.GaussianBlur(img,(5,5),0)
    median =cv2.medianBlur(img,5)
    biblur=cv2.bilateralFilter(img,9,75,75)
    
    mp.subplot(231),mp.imshow(img),mp.title('original')
    mp.xticks([]),mp.yticks([])
    
    mp.subplot(232),mp.imshow(blur),mp.title('aver')
    mp.xticks([]),mp.yticks([])
    
    mp.subplot(233),mp.imshow(gaussian_blur),mp.title('aver')
    mp.xticks([]),mp.yticks([])
    
    mp.subplot(234),mp.imshow(blur),mp.title('aver')
    mp.xticks([]),mp.yticks([])
    
    mp.subplot(235),mp.imshow(blur),mp.title('aver')
    mp.xticks([]),mp.yticks([])
    
    mp.show()
    

    相关文章

      网友评论

          本文标题:opencv python版-lesson 16

          本文链接:https://www.haomeiwen.com/subject/lytbmctx.html