diff --git a/04. Programming/OpenCV API.md b/04. Programming/OpenCV API.md index ab538b2..af0c26a 100644 --- a/04. Programming/OpenCV API.md +++ b/04. Programming/OpenCV API.md @@ -29,4 +29,10 @@ cv.dilate(src, kernel[, dst[, anchor[, iterations[, borderType[, borderValue]]]] `iterations`: 迭代次數(預設為1) ## cv2.GaussianBlur() -高斯濾波與平均濾波 Averaging 類似,平均濾波 Averaging 的 kernel 裡的每個 pixel 權重都是1,而高斯濾波給予每個 pixel 不同權重,中心 pixel 的權重最高,越往邊角權重就越低,相較於平均濾波 Averaging 這樣可以讓圖片失真較少,高斯濾波通常去除雜訊也有不錯的效果。 \ No newline at end of file +高斯濾波與平均濾波 Averaging 類似,平均濾波 Averaging 的 kernel 裡的每個 pixel 權重都是1,而高斯濾波給予每個 pixel 不同權重,中心 pixel 的權重最高,越往邊角權重就越低,相較於平均濾波 Averaging 這樣可以讓圖片失真較少,高斯濾波通常去除雜訊也有不錯的效果。 + +## cv2.canny() +```python +cv.Canny( image, threshold1, threshold2[, edges[, apertureSize[, L2gradient]]] ) -> edges +``` +Canny函数的使用很简单,指定最大(`threshold2`)和最小 threshold(`threshold1`),其中 `apertureSize` 預設為3。 \ No newline at end of file