大佬们能解决函数转换问题吗?求解

 //5.膨胀
    dilate(diff_thresh, diff_thresh, dilate);
    imshow("erode", diff_thresh);

此句错误提示

严重性    代码    说明    项目    文件    行    禁止显示状态
错误    C2664    “void cv::dilate(cv::InputArray,cv::OutputArray,cv::InputArray,cv::Point,int,int,const cv::Scalar &)”: 无法将参数 3 从“void (__cdecl *)(cv::InputArray,cv::OutputArray,cv::InputArray,cv::Point,int,int,const cv::Scalar &)”转换为“cv::InputArray”    

严重性    代码    说明    项目    文件    行    禁止显示状态
错误(活动)    E0415    不存在从 "void (cv::InputArray src, cv::OutputArray dst, cv::InputArray kernel, cv::Point anchor = cv::Point(-1, -1), int iterations = 1, int borderType = 0, const cv::Scalar &borderValue = cv::morphologyDefaultBorderValue())" 转换到 "cv::debug_build_guard::_InputArray" 的适当构造函数  
 

 

 

求大佬来一段目标检测软件源代码

参数错误。dilate(Srcimg,Dstimg,Kernel)分别是原图,输出图,卷积核,你第三个参数出错。