7. Use OPenCV in the QT environment (operations on the image itself - binarization, mixing, merging and stitching)

1. Image binarization operation

double threshold( InputArray src, OutputArray dst,double thresh, double maxval, int type );
/*
	参数说明:
		src:待二值化的图像
		dst:二值化后的输出图像
		thresh:阈值(像素值超过阈值的变为maxval,小于阈值的变为0)
		maxval:最大值设定
		type: 转换方式类型
*/
//二值化
Mat gray;
cvtColor(</

Guess you like

Origin blog.csdn.net/FY_13781298928/article/details/131705093