/// <summary>
/// 参数不能是一位索引
/// </summary>
/// <param name="bmp"></param>
/// <returns></returns>
public Bitmap HoughTransform(Bitmap bmp)
{
//// create filter
//Median Medianfilter = new Median();
//// apply the filter
//Medianfilter.ApplyInPlace(bmp);
Bitmap grayImage;
if (bmp.PixelFormat != PixelFormat.Format16bppGrayScale && bmp.PixelFormat != PixelFormat.Format8bppIndexed)
{
Grayscale grayscalefilter = new Grayscale(0.2125, 0.7154, 0.0721);
grayImage = grayscalefilter.Apply(bmp);
}
else
{
grayImage = bmp;
}
// invert filter
Invert invertfilter = new Invert();
// apply the filter
invertfilter.ApplyInPlace(grayImage);
//// Edge Detector filter
DifferenceEdgeDetector EdgeDetectorfilter = new DifferenceEdgeDetector();
//// apply the filter
EdgeDetectorfilter.ApplyInPlace(grayImage);
//// create filter
Dilatation dilatationfilter = new Dilatation();
//// apply the filter
dilatationfilter.ApplyInPlace(grayImage); return grayImage;
}

aforge之hough的更多相关文章

  1. C# 使用AForge调用笔记本摄像头拍照

    vs2012  winform 连接摄像头设备,这里需要引入 代码: using AForge; using AForge.Controls; using AForge.Imaging; using ...

  2. 使用 AForge.NET 做视频采集

    AForge.NET 是基于C#设计的,在计算机视觉和人工智能方向拥有很强大功能的框架.btw... it's an open source framework. 附上官网地址: http://www ...

  3. Aforge.net之旅——开篇:从识别验证码开始

    时间过得真快啊,转眼今年就要过去了,大半年都没有写博客了,要说时间嘛,花在泡妹子和搞英语去了,哈哈...前几天老大问我 怎么这么长时间都没写博客了,好吧,继续坚持,继续分享我的心得体会. 这个系列我们 ...

  4. Hough Transform

    Hough Transform Introduction: The Hough transform is an algorithm that will take a collection of poi ...

  5. hough变换检测线和圆

    参考:http://blog.163.com/yuyang_tech/blog/static/21605008320130233343990/ 这篇介绍的基本思想. http://www.cnblog ...

  6. Matlab 霍夫变换 ( Hough Transform) 直线检测

    PS:好久没更新,因为期末到了,拼命复习中.复习久了觉得枯燥,玩玩儿霍夫变换直线检测 霍夫变换的基本原理不难,即便是初中生也很容易理解(至少在直线检测上是这样子的). 霍夫变换直线检测的基本原理:(不 ...

  7. C# WPF 显示图片和视频显示 EmuguCv、AForge.Net测试(续)

    介绍 本文是接着上文<C# WPF 显示图片和视频显示 EmuguCv.AForge.Net测试>写的,建议先看下上文,因为有些代码还需要了解. 增添 接着上文的代码,我们可以在事件处理方 ...

  8. C# WPF 显示图片和视频显示 EmuguCv、AForge.Net测试

    WPF 没有用到 PictureBox, 而是用Image代替. 下面我试着加载显示一个图片 . XAML <Image x:Name="srcImg"Width=" ...

  9. 【转】终于干了点正事。。三天用了三个库opencv、emgu、aforge.net[2011.7.30]

    原文转自: http://blog.csdn.net/tutuguaiguai0427/article/details/6646051 这阵子,确切说这几天,还是看了好多东西的.虽然无用功居多. 上篇 ...

随机推荐

  1. C#删除只读文件或文件夹(解决File.Delete无法删除文件)

    引用: http://www.jb51.net/article/72181.htm   C#删除只读文件的方法: if (File.GetAttributes(FFName).ToString().I ...

  2. jmeter java性能测试

    本篇文章主要讲解jmeter如何测试java请求,以项目中某个接口为例,请求数据为post,返回也为post 1:新建maven工程,pom文件为 <project xmlns="ht ...

  3. 5.Struts2的OGNL表达式

    1.创建javaweb项目Struts2_Part4_OGNL并在WebRoot下的WEB-INF下的lib文件夹下添加如下jar文件 commons.jar commons.jar freemark ...

  4. LeetCode 319. Bulb Switcher

    There are n bulbs that are initially off. You first turn on all the bulbs. Then, you turn off every ...

  5. iOS 8 AutoLayout与Size Class自悟(转载)

    iOS 8 AutoLayout与Size Class自悟 Size classiOS 8 AutoLayout 前言 iOS8 和iPhone6发布已经过去蛮久了,广大的果粉终于迎来了大屏iPhon ...

  6. ECOS-Ecstore证书生产失效问题排查

    无法生成证书问题排查 无法生成证书问题排查 author :James,jimingsong@vip.qq.com since :2015-03-02 名称解释(官方) 常见错误 1. 名称解释(官方 ...

  7. how to make a git repo un-git?

    If you have a git repo and now you want to make it a plain filesystem tree .. (removing the git trac ...

  8. python修炼4

    ---恢复内容开始--- 集合 建立  set() ={},集合没有顺序,由不可改变的数字 ,字符串,元组构成 #交集print(a&b) #a.intersection(b) #并集prin ...

  9. MySQL的保留关键字,使用时尽量避免

    今天用phpmyadmin时,注意到一个提示: 列名 'update' 是一个MySQL 保留关键字. 突然意识到还是应该尽量避免这些保留关键字,也百度了一下.找到了这些关键字,列出来下 使用mysq ...

  10. Linux修改SSH端口和禁止Root远程登陆

    Linux修改ssh端口22 vi /etc/ssh/ssh_config vi /etc/ssh/sshd_config 然后修改为port 8888 以root身份service sshd res ...