简体   繁体   中英

Convert Black/White image to 2d object

Hello i need to read a 2d black and white image and convert that to an 2d Object that can be ready by AutoCAD, so the file format will have to be DFX, i think. I am not realy sure how to go about this, it will be used for a machine there shale cut a shape out of a plexiglass plate, where white is nothing and black is plexiglass. I have really no idea on how to attack this problem, reading the image file and determining where it is black or white is easy! But the question is what to do with this data? as i understand it dose the DFX file format work in lines? Any information or advise would be greatly appreciated!

Autodesk provides a reference for the DXF file format . It looks like it's indeed a line-by-line representation of the contents of an Autocad(R) drawing.

There also other variations, like "Binary DXF" (a Google search for "DXF file format" will yield more links).

AutoCAD works with vector images. You sholud look at bitmap-to-vector convertion.

You can using tracing for convertion. Potrace is an open source bitmap-to-vector tracer library. Potrace can currently produce the following output formats: DXF

However, bitmap tracing is imperfect; for high-quality vector image, line tracer is generally only used to do the initial tracing, which would later be hand-tweaked. Inkscape , an open source vector image editor, provides built-in support for tracing (internally using potrace).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM