0% found this document useful (0 votes)
29 views

Lecture 3.1.2 Line Detection

Line Detection

Uploaded by

princedzn08
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Lecture 3.1.2 Line Detection

Line Detection

Uploaded by

princedzn08
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

University Institute of Engineering

DEPARTMENT OF COMPUTER SCIENCE


& ENGINEERING
Bachelor of Engineering (Computer Science & Engineering)
Subject Name : Computer Vision
Subject Code: 21CSH/ITH-422
Topic: Lecture-3.1.2
Lecture- Line Detection

DISCOVER . LEARN . EMPOWER


Syllabus
•UNIT-3: Image Segmentation, Representation and Description

•CHAPTER-5: Image Segmentation:


•Point, Line and Edge Detection, Thresholding, Edge and Boundary linking, Region Based
Segmentation

• CHAPTER-6: Image Representation & Descriptions:


• Boundary representations, Region Representations, Boundary Descriptors, Regional
Descriptors.

2
Line Detection
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

• Edge Detection common name is line detection.


• While edges (i.e. boundaries between regions with relatively distinct gray levels) are by far
the most common type of discontinuity in an image, instances of thin lines in an image
occur frequently enough that it is useful to have a separate mechanism for detecting them.
Here we present a convolution-based technique which produces an image description of the
thin lines in an input image. Note that the Hough transform can be used to detect lines;
however, in that case, the output is a parametric description of the lines in an image.
•How It Works
•The line detection operator consists of a convolution kernel tuned to detect the presence of
lines of a particular width n, at a particular orientation. Figure 1 shows a collection of four
such kernels, which each responds to lines of single-pixel width at the particular orientation
shown.
Line Detection (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

Figure 1 Four line detection kernels which respond


maximally to horizontal, vertical and oblique (+45
and - 45 degree) single-pixel wide lines.
Line Detection (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

• These masks above are tuned for light lines against a dark background and would
give a big negative response to dark lines against a light background. If you are
only interested in detecting dark lines against a light background, then you should
negate the mask values. Alternatively, you might be interested in either kind of
line, in which case, you could take the absolute value of the convolution output. In
the discussion and examples below, we will use the kernels above without an
absolute value.
• If denotes the response of kernel i, we can apply each of these kernels across an
image, and for any particular point, if for all that point is more likely to contain a
line whose orientation (and width) corresponds to that of kernel i.
Line Detection (cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

• One usually thresholds to eliminate weak lines corresponding to edges and other
features with intensity gradients which have a different scale than the desired line
width. In order to find complete lines, one must join together line fragments, e.g.
with an edge tracking operator.
Guidelines for use…..
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

• To illustrate line detection, we start with the artificial image


which contains thick line segments running horizontally, vertically and obliquely across the image. The result

of applying the line detection operator, using the horizontal convolution kernel shown in Figure 1.a, is
(Note that this gradient image has been normalized for display.) There are two points of interest to note here.
1. Notice that, because of the way that the oblique lines (and some `vertical' ends of the horizontal bars) are
represented on a square pixel grid, e.g. shows a zoomed region containing both features, the horizontal line
detector responds to more than high spatial intensity horizontal line-like features, e.g.

On an image such as this one, where the lines to be detected are wider than the kernel (i.e. the image lines
are five pixels wide, while the kernel is tuned for a single width pixel), the line detector acts like an edge
detector: the edges of the lines are found, rather than the lines themselves.
Guidelines(cont…)
Images taken from Gonzalez & Woods, Digital Image Processing (2002)

•This latter fact might cause us to naively think that the image which gave rise to

• contained a series of parallel lines rather than single thick ones. However, if we compare this result
to that obtained by applying the line detection kernel to an image containing lines of a single-pixel
width, we find some consistent differences. For example, we can skeletonize the original(so as to
obtain a representation of the original wherein most lines are a single-pixel width), apply the
horizontal line detector and then threshold the result.
• If we then threshold the original line detected image at the same pixel value, we obtain the full
image
• Thus, the values corresponding to the true, single-pixel lines found in the skeletonized version are
stronger than those values corresponding to edges. Also, if we examine a cropped
and zoomed version of the line detected raw image and the skeletonized line detected image.
3. Weblink (cse.unr)

References
• Books and Journals
• Gonzalez and Woods: Digital Image Processing ISDN 0-201-600- 781, Addison Wesley 1992.
• Forsyth and Ponce: Computer Vision A Modern Approach Pearson Education Latest Edition.

• Video Link-
•https://youtu.be/i3ANIRt9qRg

• Weblink -
• (cse.unr)

9
THANK YOU

You might also like