0
votes

I'm trying to find contours to convert image to dxf file. as you see this is the image which I work on.

enter image description here

Image<Gray, byte> imgOut = img.Convert<Gray, byte>() .ThresholdBinary(new Gray(100), new Gray(255));

when I use find contours and then draw them in a new image I got this

enter image description here

when I use contours to get my dxf file I get this

enter image description here

So In result of the lines are bold and thick Emgucv threat them as they are closed polylines not single lines. what should I do?

1
It may be easier for you to draw it in AutoCAD rather than converting the image, this will keep the drawing precision. - AbdelAziz AbdelLatef

1 Answers

0
votes

What is the goal to clearify your question?

  • If you are looking for the geometric objects of the drawing you can find it directly inside the dxf file without use of EmguCV. Probably the wall and helper lines are not on the same layer. This will help to analyze features such as the area of the flat. This information is lost when you are looking on the b/w image.
  • If you are looking for low level features like connected components this post about Blob can help you. It's base on FindCountours().