2024-04-25 22:23:41 发布
网友
我需要使用带有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)
输出-
使用此代码-
输出-
相关问题 更多 >
编程相关推荐