第二个程序之图像腐蚀

xiaoxiao2021-02-28  113

#include <opencv2/opencv.hpp> using namespace cv; int main() { Mat srcImage = imread("1.jpg"); imshow("demo", srcImage); //得要腐蚀元素 Mat element = getStructuringElement(MORPH_CROSS, Size(10, 10)); Mat dstImage; erode(srcImage, dstImage, element); imshow("erode_demo", dstImage); waitKey(); return 0; }
转载请注明原文地址: https://www.6miu.com/read-31796.html

最新回复(0)