$30.00
Order NowIn this assignment you will detect straight line edges in an image provided by your TA using the
Hough transform. You can start with your program from Homework #4.
Perform the following tasks on the image
1) Compute ∂E
∂x and ∂E
∂y at each pixel using the Sobel mask.
2) Compute the squared gradient magnitude (SGM) at each pixel.
3) Determine a threshold that isolates the edges using the SGM.
4) For pixels having a SGM above the threshold, use the gradient vector ( ∂E
∂x ,
∂E
∂y ) and the edge
position (x, y) to find (ρ, θ) for the line that the edge may be on. Recall that the edge is
perpendicular to the direction of the gradient vector.
5) Use the Hough Transform to find linear edges by applying a threshold to a (ρ, θ) voting array.
Assume that the (x, y) coordinate system origin is at the bottom left corner of the image where
x increases going to the right and y increases going up.
What to Turn In
Your program should generate a binary thresholded SGM image. Print out the values computed
for ρ and θ for each linear edge found along with the number of edge pixels (votes) for the
linear edge. Also generate a binary image that is black except for white lines that are drawn
corresponding to the linear edges found by the Hough transform. The lines can be drawn across
the whole image so that you don’t have to determine the proper end-points for the lines in your
program. Submit your code, the two generated binary images, and the values described above
that are produced by your program.
WhatsApp us