Hough transform

对于图像校正,原本要求图像预先设定直线,通过读取直线左右极端坐标,判断旋转角度加以修正,经过一段时间的测试,发现该方法有所不足,首先,问卷必须印上一定长度的直线,其次,只要图像与其他线段,字符有交点,则会出现严重失误,实在不理想。经过一番搜寻,发现Hough Transform在解决该问题上十分适用,唯一缺点就是慢(对以一张1654x2288的32位黑白bitmap的校正,暂时控制在200ms内)。有待改善。具体原理如下(多谢周sir的指导):

引用内容 引用内容
The Hough transform (pronounced /ˈhʌf/, rhymes with tough) is a feature extraction technique used in image analysis, computer vision, and digital image processing.[1] The purpose of the technique is to find imperfect instances of objects within a certain class of shapes by a voting procedure. This voting procedure is carried out in a parameter space, from which object candidates are obtained as local maxima in a so-called accumulator space that is explicitly constructed by the algorithm for computing the Hough transform.

The classical Hough transform was concerned with the identification of lines in the image, but later the Hough transform has been extended to identifying positions of arbitrary shapes, most commonly circles or ellipses. The Hough transform as it is universally used today was invented by Richard Duda and Peter Hart in 1972, who called it a "generalized Hough transform"[2] after the related 1962 patent of Paul Hough.[3] The transform was popularized in the computer vision community by Dana H. Ballard through a 1981 journal article titled "Generalizing the Hough transform to detect arbitrary shapes".

Example
Consider three data points, shown here as black dots.
请稍等,图片正在下载中...新窗口中打开
* For each data point, a number of lines are plotted going through it, all at different angles. These are shown here as solid lines.
* For each solid line a line is plotted which is perpendicular to it and which intersects the origin. These are shown as dashed lines.
* The length and angle of each dashed line is measured. In the diagram above, the results are shown in tables.
* This is repeated for each data point.
* A graph of length against angle, known as a Hough space graph, is then created.

请稍等,图片正在下载中...新窗口中打开

The point where the lines intersect gives a distance and angle. This distance and angle indicate the line which bisects the points being tested. In the graph shown the lines intersect at the purple point; this corresponds to the solid purple line in the diagrams above, which bisects the three points.


更多参考资料:
下载文件 点击下载此文件



[本日志由 wbc 于 2008-08-12 10:37 PM 编辑]
文章来自: WiKi
引用通告地址: http://www.bkkss.com/trackback.asp?tbID=394
日志标签: 算法 vb.net OMR
评论: 1 | 引用: 0 | 查看次数: 1428
發表評論
暱 稱:
密 碼: 遊客發言不需要密碼.
驗證碼:  
內 容:
選 項:
雖然發表評論不用註冊,但是為了保護您的發言權,建議您註冊賬號.
字數限制 10000 字 | UBB代碼 開啟 | [img]標籤 開啟