PDA

View Full Version : MATH: Image (2 Colors) to Vectors



T2k
01-31-2002, 05:52 AM
i need a function, which will convert an image containing 2 colors (black and white) to a list of vectors(lines)/polygons which divide the black part from the white at the edges between them.
1. Is there already such an function
2. How do i reduce the produced data (at runtime of the algo), is there a way to approximate the result ?
3. can i compress an image/data by doing this(or do i waste time trying this):

- 1. let algo divide data into 2parts (min to half-max and half-max to max [by chars 0 to 127 and 127 to 255 as starting values] )
- 2. store list, compress with other algos
- 3. reduce values in area2(the area from half-max to max) by half-max, and set max to half-max
- 4. repeat step 1 until max == 1


[This message has been edited by T2k (edited 01-31-2002).]

JasonM [ATI]
02-01-2002, 03:42 PM
Not exactly an OpenGL question, but I would look into using a Hough transform if I were you. Depending on the complexity of your images, this can be a pretty expensive operation.

-Jason