opencv边缘滤波
2018-03-0422:16:11
import cv2 as cv import numpy as np def bi_demo (image): print ("ceshi") dst = cv.bilateralFilter(image,0,100,15) cv.imshow("bi_demo",dst) def shift_demo(image): dst = cv.pyrMeanShiftFiltering(image,10,50) cv.imshow("shift_demo",dst) src =cv.imread("E:/opencv_pictures/face.jpg") # 压缩图片 src = cv.resize(src, (300, 200), interpolation=cv.INTER_AREA) cv.namedWindow("test",cv.WINDOW_AUTOSIZE) cv.imshow("test",src) bi_demo(src) shift_demo(src) cv.waitKey(0) cv.destroyAllWindows()
其中图片过大,需要压缩
@青山不移,文笔不息。学习,坚持,梦想青春!