Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(15 points) Q2.4 Finding lines Write a function that uses the Hough transform output to detect lines, function (rhos, thetas) = my Houghlines (H, nLines)

image text in transcribed

image text in transcribed

(15 points) Q2.4 Finding lines Write a function that uses the Hough transform output to detect lines, function (rhos, thetas) = my Houghlines (H, nLines) where H is the Hough transform accumulator, and nLines is the mamber of lines to return. Outputs Thos and the tas are both nLinesxl vectors that contain the row and column coordinates of peaks in H, that is, the lines found in the image. Ideally, you would want this function to retum the p and 8 coordinates for the nLines highest scoring cells in the Hough accumulator. But for every cell in the accumula corresponding to a real line likely to be a locally maximal value), there will probably be a number of cells in the neighborhood that also scored high but should not be selected These non maximal neighbors can be removed using non maximal suppression. Note that this non maximal suppression step is different from the one performed earlier. Here you will consider all neighbors of a pixel, not just the pixels lying along the gradient direction. You can either implement your own non maximal suppression code or find a suitable function on the Internet (you must acknowledge and cite the source in your write-up, as well as hand in the source in your matlab/directory). Another option is to se Matlab function indilate. Once you have suppressed the non maximal cells in the Hough accumulator, retum the coordinates corresponding to the strongest peaks in the accumulator Your code can not call on Matlab's houghpeaks function or other similar functions. You may tase houghpeaks for comparison and debugging, (15 points) Q2.4 Finding lines Write a function that uses the Hough transform output to detect lines, function (rhos, thetas) = my Houghlines (H, nLines) where H is the Hough transform accumulator, and nLines is the mamber of lines to return. Outputs Thos and the tas are both nLinesxl vectors that contain the row and column coordinates of peaks in H, that is, the lines found in the image. Ideally, you would want this function to retum the p and 8 coordinates for the nLines highest scoring cells in the Hough accumulator. But for every cell in the accumula corresponding to a real line likely to be a locally maximal value), there will probably be a number of cells in the neighborhood that also scored high but should not be selected These non maximal neighbors can be removed using non maximal suppression. Note that this non maximal suppression step is different from the one performed earlier. Here you will consider all neighbors of a pixel, not just the pixels lying along the gradient direction. You can either implement your own non maximal suppression code or find a suitable function on the Internet (you must acknowledge and cite the source in your write-up, as well as hand in the source in your matlab/directory). Another option is to se Matlab function indilate. Once you have suppressed the non maximal cells in the Hough accumulator, retum the coordinates corresponding to the strongest peaks in the accumulator Your code can not call on Matlab's houghpeaks function or other similar functions. You may tase houghpeaks for comparison and debugging

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Neo4j Data Modeling

Authors: Steve Hoberman ,David Fauth

1st Edition

1634621913, 978-1634621915

More Books

Students also viewed these Databases questions

Question

5. How quickly can we manage to collect the information?

Answered: 1 week ago

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago