threshold:固定阈值二值化,ret,dst=cv2.threshold(src,thresh,maxval,type)src:输入图,只能输入单通道图像,通常来说为灰度图dst:输出图thresh:阈值maxval:当像素值超过了阈值(或者小于阈值,根据type来决定),所赋予的值type:二值化操作的类型,包含以下5种类型:cv2.THRESH_BINARY;cv2.THRESH_BINARY_INV;cv2.THRESH_TRUNC;cv2.THRESH_TOZERO;cv2.THRESH_TOZERO_INV官方文档的示例代码:i...
继续阅读 >