line detection algorithms
TRANSCRIPT
![Page 1: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/1.jpg)
Line Detection
Image Processing & Computer Vision Assignment
![Page 2: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/4.jpg)
Origin of Edges
Reference: http://www.ics.uci.edu/~majumder/DIP/classes/EdgeDetect.pdf
![Page 5: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/6.jpg)
SolutionWhat can we do : Use discontinuities in the grey- level.
![Page 7: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/10.jpg)
Different Methods -LaplacianParameters:• src – Source image• dst – Destination image• apertureSize – Size of the extended laplace kernel
![Page 11: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/12.jpg)
Uses of Line Detection• Obtaining basic structure.• Navigation/track or lane assistants.• Find vanishing points.• Identifying objects by shape.
![Page 13: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/13.jpg)
Tools Used• Tools used : Microsoft Visual Studio 2010 C#. NET.
EmguCV image processing library.
![Page 14: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/14.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/15.jpg)
Demo• Lets see how this works!!!
![Page 16: Line detection algorithms](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/16.jpg)
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](https://reader036.vdocuments.us/reader036/viewer/2022062320/55d2eb17bb61ebb5188b4586/html5/thumbnails/17.jpg)
Thank You!!!