Reputation: 868
in the following link http://homepages.inf.ed.ac.uk/rbf/HIPR2/linedet.htm it is being told that for detecting lines we need to specify the width and angle of line - "to detect the presence of lines of a particular width n, at a particular orientation theta angel". The example convolution kernels are given for 0,90,45,135 orientation and width is single pixel. My problem of understanding is, how will the convolution kernel change is I want thicker lines, means width of 3 or 5 or 7 pixel in 90 or 0 or 45 or 135 degree. What if, I want to change the angels also, how will I change the convolution kernel?
I am new in image processing so have less understanding. Please a tutorial or some of help will be appreciated.
Upvotes: 0
Views: 1241
Reputation: 3071
For thicker lines, you need a larger kernel in the conventions of your link. You will need more 2's to detect lines of the width you are looking for. For a 3-pixel width horizontal line, you will need the following kernel.
-1 -1 -1 -1 -1
2 2 2 2 2
2 2 2 2 2
2 2 2 2 2
-1 -1 -1 -1 -1
and so on, depending on angles and widths.
if you want a kernel for other orientations than 0, 40, 90, and 135 degrees, it's more complicated than kernels for 0,40, 90 and 135 orientation. There are some other methods you can use. For example, http://en.wikipedia.org/wiki/Hough_transform.
Upvotes: 2