I'm struggling with a task in my project.
My task is to detect the border of solar panel in an image taken from UAV to further detect the solar panel itself. So first, I try to draw all horizontal lines from the image using HoughP with condition that the slope~0 and this is the result (lines found are shown in red color):
horizontal lines detected using HoughP
As you can see, there are several spurious lines. From this point, I need to filter out all those spurious lines and get the only line that represent to border of those solar panels, like this:
lines indicate border of solar panel
Actually I'm reading from a research document telling that they used Hierarchical clustering algorithm to fuse all the line close together within a certain distance d?
I learn about this Hierarchical clustering algorithm and the thing is I don't know how to apply this algorithm for linear lines and how to actually "fuse" several lines that are close together into one?
Can someone enlighten me please.