17
Line Detection Image Processing & Computer Vision Assignment

Line detection algorithms

Embed Size (px)

Citation preview

Page 1: Line detection algorithms

Line Detection

Image Processing & Computer Vision Assignment

Page 2: Line detection algorithms

Contents

Introduction • What is Line Detection

Problem • How are we going to detect Lines• Is it difficult?

Solution • What can we do?

Different Methods • Sobel, Laplacian etc.

Use • What are the uses of detecting lines

Tools Used •VS 2010•EMGU CV

Demo • A demo of the solution I created

Conclusion

Page 3: Line detection algorithms

Introduction

• What is EDGE/LINE Detection : Edge detection is considered as the most common approach for detecting meaningful discontinuities in the grey- level.

Page 4: Line detection algorithms

Origin of Edges

Reference: http://www.ics.uci.edu/~majumder/DIP/classes/EdgeDetect.pdf

Page 5: Line detection algorithms

Problem• How are we going to detect Lines : Here the problem

arises. How are we going to filter lines from other stuff in an image.• First thing first – We should know that lines or

edges can be identified using the discontinuities in the grey- level. • There are different techniques• Sobel Operator for Horizontal Lines.• Sobel Operator for Vertical Lines.• Laplacian Operator.• Laplacian of Gaussian for further smoothing (CV.SMOOTH)• Canny Operator.

Page 6: Line detection algorithms

SolutionWhat can we do : Use discontinuities in the grey- level.

Page 7: Line detection algorithms

Different Methods -SobelCalculates first image derivative using Sobel operator. Use the following function to apply the Sobel operator:

Cv.Sobel( const CvArr src, CvArr dst, int xorder, int yorder,

int aperture_size=3 );

Page 8: Line detection algorithms

Different Methods -SobelParameters:

src – Source image

dst – Destination image

xorder – First Order derivative in x direction

yorder – First Order derivative in y direction

apertureSize – Size of the extended Sobel kernel, must be 1, 3, 5 or 7

The function is called with (xorder=1, yorder=0, aperture_size=3)

|-1 0 1|

|-2 0 2|

|-1 0 1|

Page 9: Line detection algorithms

Different Methods -Laplacian• The function calculates the Laplacian of the source image by

filtering the image with the following 3X3 aperture: 

|-1 -1 -1|| -1 8 -1||-1 -1 -1|

• Use the following function to apply the Laplacian operator:

• Cv.Laplace(const CvArr src, CvArr dst, int apertureSize=3)

Page 10: Line detection algorithms

Different Methods -LaplacianParameters:• src – Source image• dst – Destination image• apertureSize – Size of the extended laplace kernel

Page 11: Line detection algorithms

Different Methods – Further Smoothing Laplacian• Use the Cv.Smooth() function to remove the

Gaussian noise.• Apply the cv.smooth() method first.• Then apply the laplacian method.• More enhanced edges.

Page 12: Line detection algorithms

Uses of Line Detection• Obtaining basic structure.• Navigation/track or lane assistants.• Find vanishing points.• Identifying objects by shape.

Page 13: Line detection algorithms

Tools Used• Tools used : Microsoft Visual Studio 2010 C#. NET.

EmguCV image processing library.

Page 14: Line detection algorithms

Integrating Tools• These tools should be integrated with one another to

get the job done.• There are many tutorials on the internet on these

topics.• Configure them properly prior going forward with the

project. It will save your time for sure.

VISIT MY BLOG FOR MORE INFO : supun567.blogspot.com

Page 15: Line detection algorithms

Demo• Lets see how this works!!!

Page 16: Line detection algorithms

Conclusion• Boundaries between regions with relatively distinct

graylevels.• By far the most common type of discontinuity in an

image.• Gives acceptable results.

Page 17: Line detection algorithms

Thank You!!!