openCV 腐蝕處理

 

#include <opencv2/core/core.hpp>  
#include <opencv2/highgui/highgui.hpp>  
#include<opencv2/imgproc/imgproc.hpp>
#include <iostream>

using namespace cv; 
 
 
int main()
{
	Mat img = imread("1.jpg");
    
	

	Mat element =getStructuringElement(MORPH_RECT,Size(15,15));
    Mat img2;
	erode(img,img2,element);
	imshow("圖片測試",img2);
	waitKey(6000);
	return 0;
	
}

 getStructuringElement()函數

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章