Theme: Hough Transform (HT) MATLAB Codes and Solutions
Objective: Understanding the HT, its implementation strategy and application.
1) Line detection:
Implement line fitting algorithm using Hough Transform. Use your implementation to detect
the longest line in a given image in test1.jpg. Create the function as follows:
line = line_detection (I)
Input: I (input image)
Output: the longest line
Show the detected lines on the input image.
Test1.jpg
2) Circle detection:
Implement circle fitting algorithm using Hough Transform. Use your implementation to detect
at least three circles with different radius in test2.jpg. Create the function as follows:
C = circle_detection (I, R)
Input: I (input image), R (Specific radius of the circles that you want to detect)
Outputs: C (centers i.e. x, y coordinates of the detected circles)
Show the detected circles.
Test2.jpg