Image edge detect+create mesh

Hi all:) Some time ago i was trying to do something like this I didn’t have any idea how to make this in blender(Triangle aproximation ?) One person told me to use normal and true normal and have fun which nodes. But mesh in animation isn’t regular. I wrote some code in processing.
This is basic image I used also library to export .dxf . There is photo from blender
At first look it is ok but in some areas it looks really bad
I have quite big texture 6400x4800.But unfortunatelly unwrap isn’t perfect.

Now i am trying not to use texture but only blender material.
I have some problem which python.
I have txt output file where are triangles coordinate wroten.sample line "0.0 3.0 0.0 9.0 5.0 0.0 "
How to separate data and put numbers to variable?
I didn’t know where exactly i should write this topic.
Thanks for help:)


Interesting… but it’s not really clear what you’re trying to do. The video referenced has LOTS of problems but seems to be ok with it, but you don’t seem to be. You are outputting a file… why? You could look at some of the exporters and copy their file management.

OK.What I am trying to do ? I would like to make animation,where mesh is not regular and numbers of vertices depends of music.
Loud voice many faces-good aproximation of image,silent voice small amount of vertices-bad aproximation of image. Furthermore I want grab some of vertices and make some kind of deep

Why I want to make my own importer?
The .dxf importer is only in blender 2.49 I use 2.62. Probably on this version there is not dxf importer,Tell me if I am wrong.
You can say "Run blender 2.49 and import ". If I have one object it is OK,but if i would like to make animation 25 fps*4(or more) sec it is really laborious. I am new in python but learning 2.49 API is stepping back into the past and it doesn’t have any sense.

I wrote code to select color of face automatically.