0

I have a image like this:

da vinci's "a road in spring"

I have code to extract the lines in the form [x1,x2,y1,y2] Now i need to extract the internal rhombi, one could bruteforce combinations and check for intersections easily, but I was hoping a named, optimal algorithm existed, as the combinatoric explosion would ruin the server,

Any help appreciated

BinkyNichols
  • 223
  • 1
  • 7
  • 1
    Depending on what 'extraction' of the internal rhombi means, this question https://cs.stackexchange.com/questions/90880/how-to-find-vertices-of-bounded-region-made-by-intersection-of-lines may be a duplicate. Could you clarify what information you want to obtain from these areas? – Discrete lizard May 08 '19 at 13:02
  • I need to obtain the corner points of the rhombii, ie find the intersection points of the lines (easy), then use those in the most efficient way to find rhombi such that none of those lines intersects the areas to make smaller rhombii – BinkyNichols May 08 '19 at 13:20
  • 1
    So, for every bounded region, finding the vertices of the bounding edges would be sufficient? – Discrete lizard May 08 '19 at 13:23
  • yea, thanks, that would be great, the other question intends to find all , I just want to find the rhombii that contain no other rhombi – BinkyNichols May 08 '19 at 14:00
  • 1
    Have another look at the other question, the answer there should find exactly that. It does not find any region that contains smaller regions. – Discrete lizard May 08 '19 at 14:05

0 Answers0