c# - How To Convert a Bitmap to a Collection of Paths in WPF (in code not XAML) -
I have an occupational grid that has 3 states - occupied, free, unknown. Domicile grid is a simple 2-dimensional array of states. Grid represents a floor plan where capture = wall, free = open floor, unknown = whether behind the wall or not mapped. This grid is 800x800 fourth, which represents each cell in the real world 5cm.
I want to take it and want to do it in a WPF path shape. Then I can manipulate the screen, allow a user to add walls (by drawing lines), and finally export to CAD Standard / SVG / etc in some form.
I started playing with a writeable bitmap, make a correct image of the grid, never a bitmap is a path, and some of my lines are denticular or unrelated.
I am looking for ideas about the translation of this grid, or theatmap, lines, polygon, polyline, or path in clean WPF shapes, all make me very happy because I once had them I can do anything. Any ideas?
if your walls are only in some original geometric shapes, then more complex) you want to use or Some other conversions look like their own images, if I correctly understand that your images have only three colors, then you may not have to use some edge recognition algorithms.
EDIT: If the acquired state represents only thin surfaces of the walls, you will get lines for your walls (delimiting free / unknown areas)
Comments
Post a Comment