Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用 OpenCV 的 python 帮助将第一张图像转换为第二张图像。请帮助我做到这一点!
样本输入
样本输出
使用此代码 -
import cv2 img = cv2.imread(r'image.png',1) retval, threshold = cv2.threshold(img, 20, 255, cv2.THRESH_BINARY) cv2.imshow("Threshold",threshold) cv2.waitKey(0)
输出 -