How to connect lines using angle?

73 Views Asked by At

Working in Julia, I've a set of lines on an image. Each line has a separate label assigned to it. The following image shows:

enter image description here

Note that these lines are not straight always, for instance:

enter image description here

I've used the solution here. I'm working on the result of this statement labels = label_components(thinned, trues(3,3)). So I'm not sure how to get angle per label. I was thinking some PROTOTYPE like

for label in labels
 getangle_per_label(label)
end
then
interpolate labels with similar angles

I'm not sure how to implement it, any ideas?

0

There are 0 best solutions below