python
import cv2 as cv
import numpy as np
img = cv.imread("../mm.jpg")
cv.imshow("input", img)
dst1 = cv.blur(img, (15, 15))
dst2 = cv.GaussianBlur(img, (5, 5), sigmaX = 15)
dst3 = cv.GaussianBlur(img, (0, 0), sigmaX = 15)
cv.imshow("cv.blur", dst1)
cv.imshow("cv.GaussianBlur5_5", dst2)
cv.imshow("cv.GaussianBlur0_0", dst3)
cv.waitKey(0)
cv.destroyAllWindows()
python新知识点:
- cv.GaussianBlur()
cv中的另一个模糊方法是:cv.blur()
c++
include "all.h"
using namespace std;
using namespace cv;
void MyClass::day022() {
Mat img = myRead("mm.jpg"), dst1, dst2;
imshow("input", img);
blur(img, dst2, Size(5, 5), Point(-1, -1), 4);
GaussianBlur(img, dst1, Size(5, 5), 15, 0, 4);
imshow("GaussianBlur", dst1);
imshow("Blur", dst2);
}
c++新知识点:
- GaussianBlur()
网友评论