OpenCV erode()

OpenCV erode()

#include
#include
#include
using namespace cv;
using namespace std;
int main()
{
	Mat img = imread("E:\\photos\\IMG_5577.JPG");
	imshow("original", img);
	Mat element = getStructuringElement(MORPH_RECT, Size(15, 15));
	Mat result;
	erode(img, result, element);
	imshow("result", result);
	waitKey(0);
	return 0;
}

OpenCV erode()_第1张图片

你可能感兴趣的:(C++,OpenCV)