OpenCV-Python入門教程5-閾值分割

  一、固定閾值分割 import cv2 import matplotlib.pyplot as plt # 灰度圖讀入 img = cv2.imread('gradient.jpg', 0) # 閾值分割 ret, th = cv2.threshold(img, 127, 255, cv2.THRESH_BINARY) cv2.imshow('thresh', th) cv2.waitKe
相關文章
相關標籤/搜索