I want to use computer vision to allow my robot to detect the corners of a soccer field based on its current position. Matlab has a detectHarrisFeatures feature, but I believe it is only for 2D mapping.
The approach that I want to try is to collect the information of the lines (using line detection), store them in a histogram, and then see where the lines intersect based on their angles.
My questions are:
- How do I know where the lines intersect?
- How do I find the angles of the lines using computer vision?
- How do I update this information based on my coordinates?
I am in the beginning stages of this task, so any guidance is much appreciated!
You can use Hough Transform to find the lines and their equations in an image. once you have that, finding an intersection between the 2 lines comes down to solving a linear equation with 1 variable.