I need to replace this(all such doors):door image
with a line: line image
I am trying to use python modules for this, but I don't know how to approach the problem.Can I detect arcs using easy dxf? But what do I do after that? Any help, even with regard to the algorithm to follow will be appreciated.
DXF files are plain text and not that difficult to parse. My nctools module on Github contains a rudimentary DXF parser for a limited set of entities. There are complete references to the format online.
The drawing of the door can be done in several ways. It could be one ARC with a bunch of LINEs or a bunch of POLYLINEs. And they wouldn't have to be in any particular order to yield the same image. And the doors could be in different orientations. So in general detecting this shape is very difficult.
There are several situation that could make it better, ranked from easy to difficult.
Handling anything other than case 1 or 2 will be unpleasant and difficult to say the least.