OpenCV--图像二值化、阈值化

阈值化 (1)直接 cvtColor(sourceImg, imgGray, CV_BGR2GRAY); //转成灰度 Mat dst=imgGray>150; //大于150为白色 imshow("二值化",dst); (2)threshold() 固定阈值操做 double cv::threshold( cv::InputArray src, // 输入图像 灰度图cvtC
相关文章
相关标签/搜索