Content deleted Content added
No edit summary |
mNo edit summary |
||
(7 intermediate revisions by 6 users not shown) | |||
Line 1:
{{Short description|Algorithm}}
In image processing, '''line detection''' is an algorithm that takes a collection of ''n'' [[edge detection|edge points]] and finds all the lines on which these edge points lie.<ref name=":0">{{Cite book
== Hough transform ==
The [[Hough transform]]<ref name="
==
In a [[Kernel (image processing)|convolution]]-based technique, the line detector operator consists of a convolution masks tuned to detect the presence of lines of a particular width n and a θ orientation. Here are the four convolution masks to detect horizontal, vertical, oblique (+45 degrees), and oblique (−45 degrees) lines in an image.
Line 248 ⟶ 249:
The code was used to detect only the vertical lines in an image using Matlab and the result is below. The original image is the one on the top and the result is below it. As can be seen on the picture on the right, only the vertical lines were detected
[[File:Testbuilding.jpg|thumb|Original Image]]
[[File:LineImage
<syntaxhighlight lang="matlab">
clear all
|