1.效果展示
2.处理函数
CV_EXPORTS_W Mat getStructuringElement(int shape, Size ksize, Point anchor=Point(-1,-1));
在下面路径下找到函数的具体实现(在modules文件夹下搜索文字内容)
C:\Program Files (x86)\opencv\sources\modules\imgproc\src\morph.cpp
本次只是顺带找到openCV库中方法的具体实现,暂时不看方法中的具体实现过程
函数的实现:
cv::Mat cv::getStructuringElement(int shape, Size ksize, Point anchor)
{
int i, j;
int r = 0, c = 0;
double inv_r2 = 0;
{
int i, j;
int r = 0, c = 0;
double inv_r2 = 0;
CV_Assert( shape == MORPH_RECT || shape == MORPH_CROSS || shape == MORPH_ELLIPSE );