您的位置:首页 > 编程语言 > C#

Canny 边缘检测 (Emgu.CV)

2015-07-07 13:49 465 查看

边缘检测算法实现还未看,先贴代码

OpenFileDialog ofd = new OpenFileDialog();
if (ofd.ShowDialog() == DialogResult.OK)
{
Image< Bgr, Byte> img1 = new Image< Bgr, byte>(ofd.FileName);
pictureBox1.Image = img1.ToBitmap();
//convert the img1 to grayscale and the filter out the noise
Image< Gray, Byte> gray1 = img1.Convert< Gray, Byte>().PyrDown().PyrUp();
Image< Gray, Byte> cannyGray = gray1.Canny(120, 180);
pictureBox2.Image = cannyGray.ToBitmap();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  canny 边缘检测 c# emgu