/// <summary>
/// 添加边框
/// </summary>
/// <param name="srcMat">图片</param>
/// <param name="top">顶部</param>
/// <param name="bottom">底部</param>
/// <param name="left">左部</param>
/// <param name="right">右部</param>
/// <param name="borderType">边界类型;Constant纯色,Default扩散</param>
/// <param name="value">边界颜色</param>
/// <returns></returns>
public static Mat CopyMakeBorder(Mat srcMat, int top, int bottom, int left, int right, BorderTypes borderType, Scalar? value = null)
{
Mat dstMat = new Mat();
Cv2.CopyMakeBorder(srcMat, dstMat, top, bottom, left, right, borderType, value);
return dstMat;
}
标签:right,Mat,C#,边框,OpenCV,int,添加,dstMat
From: https://www.cnblogs.com/qq2806933146xiaobai/p/18294384