Posts

Showing posts with the label エッジ抽出

Edge Extraction with OpenCV and Python 画像処理学習メモ:エッジ抽出

Image
原画像 This person does not exist により作成 adaptiveThreshold(edge, 255, cv2.ADAPTIVE_THRESH_MEAN_C,  cv2.THRESH_BINARY, 11, 5.0) 上記のadaptiveThresholdに morphologyEx(contour_gray,cv2.MORPH_OPEN,kernel, iterations = 1) 細かいノイズの除去とエッジ自体の強調 Sobel演算子による結果 cv2.Sobel(edge,cv2.CV_8U,1,0,ksize=5) Canny(canny, 20, 100, apertureSize=3) まずblur(gray, (3, 3))でノイズ消去 Canny(canny, 20, 100, apertureSize=3)