how to write api like a vectormagic
Oh man, this practically has nothing to do with technologies, rather with processing algorithms. I don't have experience with such tool internals, but my best bet is that there goes A LOT of math. One needs to:
- Extract bunch of curves from image, which represents edges in picture.
- Construct arbitrary number of shapes composed of previous extracted curves. Construction of shapes possibly should be done in such a way that minimizes total number of shapes and/or number of different pixels between original and vector form of image and possibly something else...
- Fill constructed shapes with corresponding color and/or color gradient and/or somehow else...
1 and 2 means that program automatically extracts and merges big number of mathematical formulas representing curves/shapes in image. I can't imagine other way of achieving this than using some form of genetic programming. But this can be limitation of my knowledge and/or imagination also :-)
good luck !
精彩评论